Mit*_*eat 51
select top 10 Name, Price
from MyTable
order by Price desc
Run Code Online (Sandbox Code Playgroud)
更新:@Remou指出:
"Access SQL选择匹配,因此它将选择具有相同最高价格的所有项目,即使这包括超过10条记录.解决方法是按价格和唯一字段(列)进行排序."
因此,如果您有唯一的产品代码列,请添加如下:
select top 10 Name, Price
from MyTable
order by Price desc, UniqueProductCode desc
Run Code Online (Sandbox Code Playgroud)