本意是查询是否有重复的标题
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

解决方案 »

  1.   

    declare @STitle varchar(255)
    declare @TotalRecs int
    set @STitle ='aa'
    exec ResScanRecord  @TotalRecs output, @STitle
      

  2.   

    我试了一下还是不行啊Bote_China()
      

  3.   

    是不是goALTER PROCEDURE [dbo].[ResScanRecord]
    @TotalRecs int output,
    @STitle varchar(255)
    as
    SELECT @TotalRecs=COUNT(*) FROM res where  Title=@STitle
    这里有问题呢
      

  4.   

    declare @STitle varchar(255)
    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