我有问题。我想创建一个触发器。
DELIMITER $
Create trigger xyz
before delete on worker
FOR EACH ROW
Begin
IF salary>2000
then
SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'Zakaz usuwania';
end if;
End$
DELIMITER ;
delete from pracownik where id=5
我收到错误:
错误代码:1054。'where子句'
中的未知列'salary'