日期:2014-05-19  浏览次数:20410 次

同一表的两个字段合并成一新字段(new)
想了想,我刚才问的不太对-   -,重新再问下...

回复问题表

其中有两个字段   content,printcontent

id       content                                 printcontent

1         ' '                                       aaa
2         ' '                                       bbb
3         [quote]ccc[/quote]           <table   width=100%...下面引用由... <br>

content的值是 ' ',不是null

我想再新建个字段temp

让temp中的值为

aaa
bbb
[quote]ccc[/quote]

------解决方案--------------------
select temp = (case when isnull(content, ' ') = ' ' then printcontent else content end)
from 回复问题表