需要显示多个字段,其中一个字段不重复。同时按照多个组合字段排序,取前10条

select TOP 10 City,Code,Name_CN
from CGF_S_Airport where AirportID in (select min(AirportID) from CGF_S_Airport group by City)
ORDER BY OrderNum asc,SearchKeys asc,City asc,Name_CN asc

 

今天遇到的问题,记录在此供需要的朋友查阅。此方案避免用临时表

相关文章:

  • 2021-10-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-03
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-04
  • 2022-12-23
  • 2022-12-23
  • 2021-10-25
  • 2022-12-23
相关资源
相似解决方案