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

验证的存储过程中遇到的问题
Use   company
GO
ALTER   procedure   [dbo].[sp_Login]
(@UserName   nvarchar(20),@PassWord   nvarchar(16))
as
select   UserName   from   denglu
where   UserName=@UserName   and   PassWord=@PassWord

报错:
消息   208,级别   16,状态   6,过程   sp_denglu,第   4   行
对象名     'dbo.sp_denglu '   无效。
谁帮忙改下,刚学这个,不知道怎么改.

------解决方案--------------------
Use company
GO
--创建存储过程
create procedure [dbo].[sp_Login]
(@UserName nvarchar(20),@PassWord nvarchar(16))
as
select UserName from denglu
where UserName=@UserName and PassWord=@PassWord

go

--执行存储过程
exec [dbo].[sp_Login] '用户名 ', '密码 '