首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

请教SQL中和swith case 相类似的语句是什么

2011-12-31 
请问SQL中和swith case 相类似的语句是什么?请问SQL中和swithcase相类似的语句是什么?[解决办法]case when

请问SQL中和swith case 相类似的语句是什么?
请问SQL中和swith   case   相类似的语句是什么?

[解决办法]
case when then else end
[解决办法]
case when then else end
[解决办法]
create table a(id int,fname char(8),lname char(8))

select case id when 1 then fname else lname end as name from a;

[解决办法]
case when then else end

[解决办法]
swith case 其实我感觉与 if...else...没什么大的区别,只是形式不同而已,同样是单进单出,不知道有没说错

热点排行