SQL不规则排序,ORDER BY 不规则排序,case的使用
如下:
ORDER BY case DisplaySize when 'S' then 1 when 'M' then 2 when 'L' then 3 when 'XL' then 4 when 'XXL' then 5 when '3XL' then 6 end
SQL不规则排序,ORDER BY 不规则排序,case的使用
如下:
ORDER BY case DisplaySize when 'S' then 1 when 'M' then 2 when 'L' then 3 when 'XL' then 4 when 'XXL' then 5 when '3XL' then 6 end