开发者

mysql Trigger Issue "in wrong schema"

I am running

delimiter //
create trigger beforeYourTableUpdate  BEFORE UPDATE on YourTable
FOR EACH ROW
BEGIN
  SE开发者_开发问答T new.guid_column := (SELECT UUID());
END
//

delimiter; [edit]

UPDATE YourTable set guid_column = (SELECT UUID());

DROP TRIGGER beforeYourTableUpdate;

And everytime I run this - I get the error "Trigger in wrong schema" using MySQL 5.5

Any ideas why this would be ?


You didn't reset the delimiter, you might want to add

delimiter ;


You have to add the schema you're working with. On the top, add:

use 'yourWorkingSchema';

That should solve the problem.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜