把sql sever语句改为mysql,小弟初学,希望能得到答复,关键是语法的改写。谢谢啦
sqlsever语句:select*from(selecttop10*from(selectsum(number)asamount,ISBNfromtb_Order_de...
sql sever语句:select * from (select top 10 * from ( select sum(number) as amount,ISBN from tb_Order_detail group by ISBN )as tab order by amount desc) o inner join tb_bookinfo b on o.ISBN=b.ISBN order by o.amount desc
展开
1个回答
展开全部
select * .
from (select * from ( select sum(number) as amount,ISBN from tb_Order_detail group by ISBN )as tab order by amount desc limit 0, 10) o
inner join tb_bookinfo b on o.ISBN=b.ISBN order by o.amount desc
from (select * from ( select sum(number) as amount,ISBN from tb_Order_detail group by ISBN )as tab order by amount desc limit 0, 10) o
inner join tb_bookinfo b on o.ISBN=b.ISBN order by o.amount desc
追问
[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.
from (select * from ( select sum(number) as amount,ISBN from tb_Order_detail ' at line 1
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询