Hello.
SQL 99 allows action Granularity FOR EACH STATEMENT, and it is default. But FOR EACH ROW is more common and it seems MySQL supports only second. When Granualarity FOR EACH STATEMENT trigger action occurs only once, when FOR EACH ROW - once for each row (3 times in your case). Philippe Poelvoorde <[EMAIL PROTECTED]> wrote: > Hi, > > the syntax for creating a triggers is : > CREATE TRIGGER trigger_name trigger_time trigger_event > ON tbl_name FOR EACH ROW trigger_stmt > > Is there any other possibilities than "FOR EACH ROW" ? > If I do : > CREATE TABLE test(foo varchar(5)); > CREATE TRIGGER trigger_name AFTER INSERT > ON test FOR EACH ROW do_something; > INSERT INTO test(foo) VALUES ('a'),('b'),('c'); > it would trigger trigger_name for the 3 inserts, right ? Any chance to > trigger trigger_name only once at the end ??? > -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]