不能创建触发器。
ALTER TRIGGER tttttt ON RAIN
FOR INSERT
AS
DECLARE @stcd char(10)
DECLARE @tm datetime
DECLARE @v float
declare @mark int
declare @type int
select @stcd=stcd,@tm=tm,@v=rn,@mark= '0 ',@type= '1 ' from inserted
insert into outstr(stcd,tm,v,mark,type) values (@stcd,@tm,@v,@mark,@type)
错误208:对象名:tttttt无效。
我发现我的SQL好像就是创建不了触发器,真奇怪了。。。郁闷ing
------解决方案--------------------CREATE TRIGGER tttttt ON RAIN
FOR INSERT
AS
DECLARE @stcd char(10)
DECLARE @tm datetime
DECLARE @v float
declare @mark int
declare @type int
select @stcd=stcd,@tm=tm,@v=rn,@mark= '0 ',@type= '1 ' from inserted
insert into outstr(stcd,tm,v,mark,type) values (@stcd,@tm,@v,@mark,@type)
------解决方案--------------------ALTER 是修改,用Create
CREATE TRIGGER tttttt ON RAIN
FOR INSERT
AS
DECLARE @stcd char(10)
DECLARE @tm datetime
DECLARE @v float
declare @mark int
declare @type int
select @stcd=stcd,@tm=tm,@v=rn,@mark= '0 ',@type= '1 ' from inserted
insert into outstr(stcd,tm,v,mark,type) values (@stcd,@tm,@v,@mark,@type)
------解决方案--------------------ALTER TRIGGER 是在你的觸發器tttttt 存在的時候用的,如果tttttt 不存在,用CREATE TRIGGER