本意是查询是否有重复的标题
goALTER PROCEDURE [dbo].[ResScanRecord]
@TotalRecs int output,
@STitle varchar(255)
as
SELECT @TotalRecs=COUNT(*) FROM res where Title=@STitle我在调试执行时得不到结果,请问问题出在那里declare @STitle varchar(255)
declare @TotalRecs int
exec ResScanRecord @TotalRecs output, @STitle='aa'
go
declare @TotalRecs int
set @STitle ='aa'
exec ResScanRecord @TotalRecs output, @STitle
@TotalRecs int output,
@STitle varchar(255)
as
SELECT @TotalRecs=COUNT(*) FROM res where Title=@STitle
这里有问题呢
declare @TotalRecs int
set @STitle ='aa'
exec ResScanRecord @TotalRecs output, @STitledeclare @STitle varchar(255)
declare @TotalRecs int
set @STitle ='aa'
exec ResScanRecord @TotalRecs output, @STitle