请教关于触发器的问题
我写了一个AFTER INSERT的触发器,加入之后就无法往表里插入数据了,不知道怎么回事,还请大侠指教一二
新手勿喷,不胜感激,大致是这样的
ALTER TRIGGER [dbo].[Update_Limit_Day]
ON [dbo].[Data]
AFTER INSERT
AS
DECLARE @date char(8)
DECLARE @stationid int
DECLARE @temp float
DECLARE @humi float
DECLARE @carbon float
DECLARE @alco float
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for trigger here
SELECT @date=CONVERT(char(8),SaveTime) FROM inserted
--SELECT @date=CONVERT(char(8),GETDATE(),102)
SELECT @stationid=StationID FROM inserted
SELECT @temp=Temperature FROM inserted
SELECT @humi=Humidity FROM inserted
SELECT @carbon=CarbonDioxide FROM inserted
SELECT @alco=Alcohol FROM inserted
END
[解决办法]