摘要: sql语言中有没有类似C语言中的switch case的语句?? 没有,用case when 来代替就行了. 例如,下面的语句显示中文年月 select getdate() as 日期,case month(getdate()) when 11 then '十一' when 12 then '十二' else substring('一二三四五六七八九十', month(getdate()),1) end+'月' as 月份=================================================CASE可能 阅读全文
posted @ 2013-07-05 12:24 幻星宇 阅读(382) 评论(0) 推荐(0) 编辑