我想在插入之前检查是否存在带有触发器的行是我的表和触发器
表学生:ID | 姓名
触发验证:
CREATE TRIGGER `validation` BEFORE INSERT ON `students`
FOR EACH ROW
begin
declare var_name varchar(255);
declare check_row varchar(255);
set var_name = new.name;
select name into check_row from students where name = var_name;
end