我的触发器:
create trigger cnt after insert on tc_contract
for each rowbegin
select count(*) into @num from tc_contract group by account_id where account_id = new.account_id;
if @num >0 and @num <3 then
update tc_account set account_status = 2 where account_id = new.account_id;
end if;
end
错误信息:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL
server version for the right syntax to use near 'where account_id = new.account_id;
if @num >0 and @num <3 then update tc_accou' at line 4