猿问
case...when 语句的作用是什么
这样查询后表中的数据并没有改变,这样查询有什么意义?表中并没有多出叫部门的一列
qq_剑客绿珠魂_03340073
浏览 1381
回答 1
1回答
玩转IT
举个例子:测试数据: usernam age1 lili 192 toto 17select username,(case age when 19 then '成年人' when 17 then '未成年人' else 'xx') as age_strfrom users;查询结果: username age_str1 lili 成年人2 toto 未成年人
0
0
0
随时随地看视频
慕课网APP
相关分类
Oracle
我要回答