Re: Trigger to reset auto increment after the table empty
already try this trigger
BEGIN
DECLARE var INT;
SET @var = (SELECT COUNT(ID) FROM MASTERBARANG LIMIT 1);
IF @var IS NULL THEN
ALTER TABLE MASTERBARANG SET AUTO_INCREMENT=1;
END;
END
but it shows error syntax on ALTER TABLE MASTERBARANG SET AUTO_INCREMENT=1;
thx for reply
Subject
Views
Written By
Posted
4246
April 25, 2014 12:55AM
2022
April 25, 2014 02:44AM
Re: Trigger to reset auto increment after the table empty
1663
April 25, 2014 02:49AM
1568
May 03, 2014 09:08PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.