CREATE PROCEDURE [dbo].[CountOfRizhi]
@num int output --1
AS
select @num=count(文档编号)from Document --2
where 文档类型='日志'
GO
@num int output --1
AS
select @num=count(文档编号)from Document --2
where 文档类型='日志'
GO
AS
select @num=select count(文档编号)from Document //set @num=@num++1
where 文档类型='日志'
GO
错在那里?应该如何实现?
AS
select @num=count(文档编号)from Document //不用select
where 文档类型='日志'
GO