呜呜呜
mysql ("select * from (select row_number() over(order by b.b_id) as rownum, ");
(" b.b_id,b.b_name,b.creat_time,t.t_name from book_info b left join book_type t on b.t_id=t.tid ");
("as bb where bb.rownum between ? and ?");
这句加降序怎么写
求告知
杭州-♂-雨藏藏
降序加 desc吧?
@南京-♀-木子 你是女的?
可以。
呜呜呜
我知道啊" b.b_id,b.b_name,b.creat_time,t.t_name from book_info b left join book_type t on b.t_id=t.tid order by (b.b_id) desc)加这报错我不知道加哪里 杭州-♂-雨藏藏
应该是和select 对应的吧
=-= 放最后括号外
呜呜呜
("select * from (select row_number() over(order by b.b_id) as rownum, ");
(" b.b_id,b.b_name,b.creat_time,t.t_name from book_info b left join book_type t on b.t_id=t.tid ");
("as bb where bb.rownum between ? and ?");
杭州-♂-雨藏藏
@南京-♀-木子 我看看有没有胸肌
呜呜呜
@杭州-♂-雨藏藏 这语句没错,就是降序问题了
呜呜呜
com.microsoft.sqlserver.jdbc.SQLServerException: 除非另外还指定了 TOP 或 FOR XML,否则,ORDER BY 子句在视图、内联函数、派生表、子查询和公用表表达式中无效。
("select * from (select row_number() over(order by b.b_id) as rownum, ");
" b.b_id,b.b_name,b.creat_time,t.t_name from book_info b left join book_type t on b.t_id=t.tid order by (b.b_id) desc)
("as bb where bb.rownum between ? and ?");
杭州-♂-雨藏藏
你在sql上截图吧
@南京-♀-木子 我要看胸肌
这种结构多好看
杭州-♂-雨藏藏
@南京-♀-木子 哼唧好饿 。。。=-= 呜呜呜
不知道在哪里加日 杭州-♂-雨藏藏
应该放在where 后面