ALTER PROCEDURE [dbo].[getaccount]
@shuliang int
@fuwuqi char(20)
as
declare @account char(100)
declare @mytable table(zhanghao char(100))
declare @jici int
set @jici = 1
while @jici <= @shuliang
begin
begin tran
select top 1 @account = account from account with (readpast,updlock) where state = '未使用'
update account set state = '已使用' where @account = account
if @@ERROR = 0
commit tran
else
rollback tran
insert into @mytable values(@account)
set @jici = @jici + 1
end
select * from @mytable
这里的第二个参数 @fuwuqi 报错,请问如何解决呀
------解决思路----------------------
参数之间加逗号啊。
------解决思路----------------------
@shuliang int,--这里加个逗号
@fuwuqi char(20)