读书人

存储过程?该怎么处理

发布时间: 2012-03-01 10:25:46 作者: rapoo

存储过程??
alter procedure sp_yh
@uid varchar(10),
@pwd varchar(20),
@qx int
as
insert into yh(用户名,密码,权限)
select * from yh where 用户名=@uid and 密码=@pwd and 权限=@qx

这是我写的存储过程
exec sp_yh '22 ', ' ', ' '
我执行时候,,为什么不能插入记录哦。。


[解决办法]
行的候有什提示有?

alter procedure sp_yh
@uid varchar(10),
@pwd varchar(20),
@qx int
as
insert into yh(用户名,密码,权限)
select 用户名,密码,权限 from yh where 用户名=@uid and 密码=@pwd and 权限=@qx
GO
--用
exec sp_yh '22 ', ' ',0

读书人网 >SQL Server

热点推荐