0
我已經使用聯合查詢合併了三個表,併爲所有列創建了按功能分組。如何在SQL Server中將可空值更改爲非空值?
這裏是我的代碼:
select
Id,
Firstname,
Mark1, Mark2, Mark3
from
(select
Id, Firstname, Null as Mark1, Null as Mark2, Null as Mark3
from
Parent
union
select
Id, Null as Firstname, Mark1, Mark2, Null as Mark3
from
Child
union
select
Id, Null as Firstname, Null as Mark1, Null as Mark2, Mark3
from
Mark) t
where
Mark3 is not null
group by
Id, Firstname, Mark1, Mark2, Mark3
在這裏,我已經設置mark3
不是null使用WHERE條件,所以我的問題是如何改變空值不爲空的使用WHERE條件的字段的休息嗎?