标准的创建触发器语言里面没有before,只有for
SQL触发器语法
语法
CREATE TRIGGER trigger_name
ON { table | view }
[ WITH ENCRYPTION ]
{
{ { FOR | AFTER | INSTEAD OF } { [ INSERT ] [ DELETE ] [ UPDATE ] }
[ WITH APPEND ]
[ NOT FOR REPLICATION ]
AS
[ { IF UPDATE ( column )
[ { AND | OR } UPDATE ( column ) ]
[ ...n ]
| IF ( COLUMNS_UPDATED ( ) updated_bitmask )
column_bitmask [ ...n ]
} ]
sql_statement [ ...n ]
}
}
BEFORE 改成FOR