首页 > 代码库 > SQL_动态排序

SQL_动态排序

declare @myOrder intset @myOrder=3select * from Students order by case @myOrder    when 1 then chinese    when 2 then math    when 3 then englishenddesc

 

SQL_动态排序