CREATE TRIGGER tongji ON [dbo].[user]
FOR INSERT, UPDATE, DELETE
AS
declare @num int ;
select count(*) into @num from [user] where username='zhang'
在sqlserver2000下count后的数值 这样做对吗 ?应该怎么做?
FOR INSERT, UPDATE, DELETE
AS
declare @num int ;
select count(*) into @num from [user] where username='zhang'
在sqlserver2000下count后的数值 这样做对吗 ?应该怎么做?
FOR INSERT, UPDATE, DELETE
AS
declare @num int ;
select @num = count(*) from [user] where username='zhang'
ON [dbo].[user]
FOR INSERT, UPDATE, DELETE
AS select count(*) from deleted where username='zhang'
要不然,你會被搞混了.
CREATE TRIGGER tongji ON [dbo].[user]
FOR INSERT, UPDATE, DELETE
AS
declare @num int ;
select @num = count(*) from [user] where username='zhang'
CREATE TRIGGER tongji ON [dbo].[user]
FOR INSERT, UPDATE, DELETE
AS
declare @num int ;
select @num=count(*)from [user] where username='zhang'
这样才是给变量赋值呀!!
select @num = count(*) from [user] where username='zhang'