有关存储过程的问题,分析是老出问题,帮忙看一看。

realxuj 2003-05-04 11:05:37
代码如下:
use banking
go

Creat procedure spRetrieveBalance @userID int
as
select Balance from tblAccount where
userID=@userID
go


出错提示:
服务器: 消息 156,级别 15,状态 1,行 2
在关键字 'procedure' 附近有语法错误。
服务器: 消息 137,级别 15,状态 1,行 5
必须声明变量 '@userID'。

我不明白要在哪声明变量@userID,我按书上的示例格式写的。

先谢过了。。。
...全文
20 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
pengdali 2003-05-04
  • 打赏
  • 举报
回复
Create procedure spRetrieveBalance
@userID int
as
select Balance from tblAccount where
userID=@userID
go

22,207

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server 疑难问题
社区管理员
  • 疑难问题社区
  • 尘觉
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧