日期:2014-05-18  浏览次数:20466 次

麻烦高手帮忙给指正一个存储过程的错误
CREATE PROCEDURE AddMemberxggz
@account nvarchar(20)

 AS

declare @count int
select @count = count(*) from t_members_xggz where account = @account collate Chinese_PRC_CS_AI 

if @count = 0
begin
insert into t_members_xggz (memberid,memberaccount) values (select id from t_Members where account=@account,@account)
end
else
begin
return -1
end


GO


这样的一个存储过程,报错说select附近,有语法错误
第十一行“,”附近有语法错误,麻烦高手帮忙改下

------解决方案--------------------
insert into t_members_xggz (memberid,memberaccount) 
select id,@account from t_Members where account=@account