存储过程问题~

lfq_adam 2009-04-14 05:33:31
alter proc [dbo].[pro_distributionGarnishTime]
@b int output
as
begin
set @b =(select building_id from orders where order_id = 3)
end

这样定义存储过程能通过编译,
不过在调用的时候要报
消息 208,级别 16,状态 1,过程 pro_distributionGarnishTime,第 5 行
对象名 'orders' 无效。

(1 行受影响)

高手支招~
...全文
135 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
helongde0623 2009-04-14
  • 打赏
  • 举报
回复
一楼的做法更好:
select @b = building_id from orders where order_id = 3
jumleres 2009-04-14
  • 打赏
  • 举报
回复
一楼的做法更好:
select @b = building_id from orders where order_id = 3
boywangliang 2009-04-14
  • 打赏
  • 举报
回复
他的好像也没有错啊
q184653922 2009-04-14
  • 打赏
  • 举报
回复
Alter是修改
肯能表名有问题
ezhuo 2009-04-14
  • 打赏
  • 举报
回复
没有修改过存储过程
sushou2009 2009-04-14
  • 打赏
  • 举报
回复
一楼好玩...是create....
大头_衍 2009-04-14
  • 打赏
  • 举报
回复
呵呵
看一樓的
Teng_s2000 2009-04-14
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 zhoukang0916 的回复:]
alert?

create
[/Quote]
对阿,你都没有呢,alter干什么呢,alter是修改的意思啊
lvxianda 2009-04-14
  • 打赏
  • 举报
回复
mark
PandaIT 2009-04-14
  • 打赏
  • 举报
回复
alert?

create
tailor_ms 2009-04-14
  • 打赏
  • 举报
回复

select @b = building_id from orders where order_id = 3


这样试试.

110,534

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

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