我在 Mac 上使用 azure data studio。
我想把数据从另一个表加载到我创建的新表中,原表的列中包含了一些空值,而我的新表是不应该有的.我怎么做插入并排除空值?
insert into [Faculty].[Department](
DepartmentName,
DepartmentCode
)
select departmentName, departmentCode
from [].[]
但我想让我的新表排除空值,我试过一个where语句,但没有成功,请帮助:(
不知道你用的是什么数据库.可以试试下面的。
insert into [Faculty].[Department](
DepartmentName,
DepartmentCode
)
select departmentName, departmentCode
from anothertable
where anothertable.col is NOT null