顯示廣告
隱藏 ✕
看板 Book11
作者 book11 (不可失憶)
標題 ORDER BY按照指定的文字順序取出資料
時間 2012年09月10日 Mon. AM 10:57:08


http://itgroup.blueshop.com.tw/uuuiii00/AllenJ?n=convew&i=13404

1.order   by   charindex(type, 'ABC')
2.order   by   (case   type   when SN = 'A' THEN 1 when SN = 'B' THEN 2 END),(CASE type when ID = '1' then....END)
3.union all

--
※ 作者: book11 時間: 2012-09-10 10:57:08
※ 編輯: book11 時間: 2012-09-10 13:51:04
※ 看板: Book11 文章推薦值: 0 目前人氣: 0 累積人氣: 372 
r)回覆 e)編輯 d)刪除 M)收藏 ^x)轉錄 同主題: =)首篇 [)上篇 ])下篇