【发布时间】:2012-07-20 00:27:23
【问题描述】:
我有下表:
inventor(inventorID, PatentNo, InventorFirst, InventorLast, City, State)
inventorid 是 pk,patentno 是 fk。
这是当前插入代码:
insert into Inventor (PatentNo, InventorFirst, InventorLast, City, statename, country, NationalityCountry, ResidenceCountry)
select PatentNo, InventorFirstname, InventorLastname, City, statename, country, NationalityCountry, ResidenceCountry
from InventorUpdate;
我想修改它,如果 InventorFirstname 和 InventorLastname 字段为空,则它不会插入到发明人表中
【问题讨论】:
标签: sql sql-server sql-server-2008 insert