Hi
Would not be better solution to create an unique index? or a primary key?
CREATE UNIQUE INDEX i_test1 ON test1(code);
or
ALTER TABLE test1 ADD CONSTRAINT PRIMARY KEY (code);
Then you´ll get an error on existing row with less effort.
Greetings.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.