开发者

Creating trigger in oracle

开发者 https://www.devze.com 2023-03-05 23:45 出处:网络
create or开发者_高级运维 replace trigger insert_catid beforeinsert or update or delete on categories
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.

0

精彩评论

暂无评论...
验证码 换一张
取 消