在使用时间戳为每次插入创建日志时,我收到以下代码的错误。
CREATE TRIGGER [dbo].[log_trig]
ON [dbo].[CUSTOMER]
FOR INSERT
AS
BEGIN
SET NoCount ON
DECLARE @_id INT
DECLARE @_time TIMESTAMP
SET @_id = NEW.id
SET @_time = now()
insert into log values (@_id, @_time)
END