我得到了这个选择查询的帮助,我用它来获取两列中具有空值的所有表
select count(*)
from (
select LastModifiedDate from Table1
union all
select LastModifiedDate from Table2
union all
select LastModifiedDate from Table3
) a
where LastModifiedDate is null
要更新所有三个表,那么有更好的方法吗
Update table1
SET LastModifiedDate = GETDATE()
WHERE LastModifiedDate is null
Update table2
SET LastModifiedDate = GETDATE()
WHERE LastModifiedDate is null
等等?抱歉,我将查询拆分为一个查找 CreationDate 和一个查找 LastModifiedDate