替换字符串问题
如何把某列的NULL和 ' '替换成该表的另外一列的值
要SELECT
不要UPDATE
[解决办法]
select case when col1 is NULL or col1= ' ' then col2 else col1 end from 表
[解决办法]
select (case when col is null or col= ' ' then col1 else col end) as col from table