[MySql Query Browser]STORED PROCEDURE

Discussion of open issues, suggestions and bugs regarding database management and administration tools for MySQL
Post Reply
kelinda72
Posts: 9
Joined: Fri 05 May 2006 10:27

[MySql Query Browser]STORED PROCEDURE

Post by kelinda72 » Mon 22 May 2006 15:19

I need to call the stored procedure below, (made in MYSQL QUERY BROWSER) How you can see it delete all record int the table progetti, and I want add the code in this procedure that after delete records, initialize the autoinc field CODICE from 1. How can i do that?
thanks a lot.

DELIMITER $$
DROP PROCEDURE IF EXISTS `sajob`.`DELPROGETTI` $$
CREATE PROCEDURE `DELPROGETTI`()
BEGIN
DELETE FROM progetti;
//inizialise field codice (1)
END $$

DELIMITER ;

Duke
Devart Team
Posts: 476
Joined: Fri 29 Oct 2004 09:25

Post by Duke » Mon 22 May 2006 15:44

To reset autoinc field you need to alter table properties. For more information, please, refer to MySQL documentation.
This forum is dedicated to Core Lab MySQL Developer product.

Post Reply