select 
case smt_date when null then getdate() else smt_date end as aaaa 
from smt_legal---------------------
smt_date 是一个日期型的字段里面有些是有数据的。。有些是null 没有录入数据。
现在想输出整个表的的内容把为空的显示成 今天的日期。有数据的则用他以前的数据
上面的SQL有问题不能正确的显示总是显示null