sqlserver分页语句出错了,大神帮我看看。。。。

select
* from(select goodid,goodname,goodadrreds,goodprice,goodagio,(select
sum(GoodNum) from OrderDetailed where GoodID='x10001'), row_number() over(order
by goodid )as cc from goods where 1=1 and goodname like '%%' and goodname not
like '%爽肤水%' and GoodGround=0 )tall where cc between 1 and 10

错误消息:没有为
'tall' 的列 6 指定任何列。

--你少了一个列名 下面的语句 应该就不会报错
--and goodname like '%%' 你这里不知道要表达什么意思 这样写没有任何意义 还不如去掉
--有什么问题可以随时找我 希望采纳
select
* from
(select goodid,goodname,goodadrreds,goodprice,goodagio,
(select sum(GoodNum) from OrderDetailed where GoodID='x10001') col1,
row_number() over(order by goodid ) as cc
from goods where 1=1 and goodname like '%%' and goodname not
like '%爽肤水%' and GoodGround=0
) tall where cc between 1 and 10
温馨提示:答案为网友推荐,仅供参考
相似回答