select top(10) from customer order by customer_id desc
答案 0 :(得分:9)
select *
from (select top 10 * from customer order by customer_id desc) a
order by customer_id
答案 1 :(得分:2)
这在MS SQL中工作得很好但是对于MySQL我们必须要去 SELECT * FROM customer ORDER BY customer_id DESC LIMIT 10
答案 2 :(得分:1)
您似乎错过了要从表中检索的列列表。
考虑:
select top(10)
*
from customer order by customer_id desc
或
select top(10)
customer_id, customer_name
from customer order by customer_id desc
答案 3 :(得分:-1)
你可以使用: SELECT * FROM customer ORDER BY customer_id DESC LIMIT 10