ÒªÇóÔÚT1Ôö¼ÓÒ»ÐмǼʱ£¬T2±íÒ²ÏàÓ¦Ôö¼ÓÒ»ÐÐ µ±È» ÒªÇóT2Ôö¼ÓµÄ¼Ç¼±ØÐëÂú×㣺T2.tid=T1.id T2.title=T1.title SQL code: create trigger tr_t1_ai after insert on t1 for each row insert into t2(tid,title) values (new.id,new.title);
Can't update table 'T1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger. °¡£¬¶Ô Ó¦¸ÃÊÇÕâ¸öÔÒòÁË£¬ÄÇÔõô½â¾öÄØ
Çë¸ßÊÖÖ¸µã,ÎÒ¶ÔÒ»Õűí²éѯºóÔÙ¸üÐÂ,²éѯÊÇ×Ó²éѯ,±¨´í: You can't specify target table 'a_table' for update in from clause ÍêÕûSQLÓï¾äÊÇ UPDATE a_table SET STATUS=0 WHERE ID=(SELECT MIN(ID) from a_tab ......