想做个根据参数出第查询记录条数的过程,调试总通不过,请大家指教。

lxhvc 2005-03-13 04:29:09
以下存储为什么不能通过语法检测啊?
Create PROCEDURE dbo.SP_CommendFood
@count int
AS
select top @count *
from TBL_Carte
order by i_DishCommend DESC
...全文
59 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
lxhvc 2005-03-13
  • 打赏
  • 举报
回复
多谢指教。
xluzhong 2005-03-13
  • 打赏
  • 举报
回复
Create PROCEDURE dbo.SP_CommendFood
@count int
AS
exec('select top '+@count+' *
from TBL_Carte
order by i_DishCommend DESC')
xluzhong 2005-03-13
  • 打赏
  • 举报
回复
Create PROCEDURE dbo.SP_CommendFood
@count int
AS
exec('select top '+@count+' *
from TBL_Carte
order by i_DishCommend DESC')

34,590

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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