create or开发者_高级运维 replace trigger insert_catid
before insert or update or delete on categories
for each row
begin
SELECT categories_seq.NEXTVAL INTO :NEW."cat_uid" FROM DUAL;
end;
i am using oracle 11g. I am compiling this trigger it is giving me error of
Error(7,36): PLS-00049: bad bind variable 'NEW.cat_uid'
please suggest me about this error
It means there is no column "cat_uid" in the table. By putting the name inside double quotes you have made it case-sensitive, so if your column is actually CAT_UID this will not work, i.e. you need to remove the quotes.
精彩评论