我有一张桌子AuditTrail
。
当我运行此查询时:
INSERT INTO AuditTrail
( EntityName, Date, [User], Action, OldValue
, NewValue, ModuleName, EntityRef, EntityAttribute
, EntityAltRef)
VALUES (aaa, '2012-02-07 00:00:00.000', sa, DELETE, '11', aaa, aaa, sa, aaa, aaa)
我收到一个错误
Incorrect Syntax Near Keyword 'DELETE'
我在这里做错了什么?
这是表结构
ID numeric(18, 0) Unchecked
EntityName nvarchar(60) Unchecked
Date datetime Unchecked
[User] sysname Unchecked
Action varchar(30) Unchecked
OldValue varchar(1024) Checked
NewValue varchar(1024) Checked
ModuleName varchar(6) Checked
EntityRef varchar(30) Checked
EntityAttribute varchar(60) Checked
EntityAltRef varchar(64) Checked