我试图将数据插入到具有可为 Null 的属性的表中。但是,我不确定如何使用我的 SQL 语句完成此操作。
INSERT INTO [dbo].[INVOICE]
([INV_ID]
,[EMP_ID]
,[WAR_ID]
,[REP_ID]
,[FIN_ID]
,[INV_DATE]
,[INV_PRICE])
VALUES
(5655,8,1**,,**3,'7/5/2000',75880),
(9749,1,1**,,**1,'11/26/2002',58881),
(9909,3,1**,187,**3,'12/27/2012',64859);
INSERT INTO [dbo].[INVOICE]
([INV_ID]
,[EMP_ID]
,[WAR_ID]
,[REP_ID]
,[FIN_ID]
,[INV_DATE]
,[INV_PRICE])
VALUES (5655,8,1**,NULL,**3,'7/5/2000',75880), (9749,1,1**,NULL,**1,'11/26/2002',58881), (9909,3,1**,187,**3,'12/27/2012',64859);
INSERT INTO [dbo].[INVOICE]
([INV_ID]
,[EMP_ID]
,[WAR_ID]
,[REP_ID]
,[FIN_ID]
,[INV_DATE]
,[INV_PRICE])
VALUES
(5655,8,1,NULL,3,'7/5/2000',75880),
(9749,1,1,NULL,1,'11/26/2002',58881),
(9909,3,1,NULL,3,'12/27/2012',64859);
您可以使用 NULL
来表示空