ITeye博客

sqlserver 中 case 的用法

firefly_liu · 2008-08-06 14:31 · 代码 · Markdown

select field1,
(case
when condition then dosomthing
when condition then dosomthing
else dosomthing
end) fieldname
from tablename

--或者在products、tigger和function中也可以使用

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。