Select A,B,C from Tb1 –查询所有
Select A,replace(B,’1’,’壹’),C from Tb1 替换查询
Tb1
A |
B |
C |
AA1 |
1 |
CC |
AA2 |
2 |
CC |
AA3 |
3 |
CC |
有什么方法 同时 把1替换为壹 把 2替换贰,把3替换叁
select CASE B WHEN '1' THEN '壹' WHEN '2' THEN '贰' ELSE '其他' END from Tb1
select A, 0 as c1, 'abc' as c2 , '' as c3 from Tb1 --虚拟列 ,空列