CREATE TRIGGER tr_age111 ON agetest FOR INSERT ASupdate agetest set age=age+'岁' where age<>''我试了,可以。。用单引号
我触发器是这样写的 CREATE TRIGGER change_age_tig ON dbo.callpolicer_Temp FOR INSERT AS update callpolicer_Temp set age=callpolicer_Temp.age+'岁' where callpolicer_Temp.age is not null or callpolicer_Temp.age<>''错误结果是插入了三个“岁”如:“25岁岁岁”“35岁岁岁”
将age<>null改为 Not (age is null)CREATE TRIGGER [YourTriggerName] ON [callpolicer_Temp] FOR INSERT ASupdate callpolicer_Temp set age=age+'岁' where (not (age is null)) and age<>''
FOR INSERT
ASupdate agetest set age=age+'岁' where age<>''我试了,可以。。用单引号
CREATE TRIGGER change_age_tig ON dbo.callpolicer_Temp
FOR INSERT
AS
update callpolicer_Temp set age=callpolicer_Temp.age+'岁'
where callpolicer_Temp.age is not null or callpolicer_Temp.age<>''错误结果是插入了三个“岁”如:“25岁岁岁”“35岁岁岁”
FOR INSERT
ASupdate callpolicer_Temp set age=age+'岁' where (not (age is null))
and age<>''