作者:
scpisces (失敗的勇氣。)
2014-06-19 23:18:00我會這樣下...;with Cte_List(code,tag)as( select code,(case when code in ('001','002','003','004')then 'a1' else tag end) from TabeName)insert into NewTableselect distinct code,tag from Cte_List如果實際上有更多像 001 002 003 004完全沒關聯的case就要下很多了......