I want to insert data into the zipcode
column of the employee3
table. SQL says write - INSERT INTO Employee3 (ZipCode) VALUES (28279);
, however I keep getting this error message:
Msg 515, Level 16, State 2, Line 1
Cannot insert the value NULL into column 'EMPLOYEEID', table
'AdventureWorks2012.dbo.EMPLOYEE3'; column does not allow nulls.
INSERT fails.
I understand other columns have "NOT NULL" CONSTRAINTS, but I only want to INSERT data to the ZipCode
column. Is there anyway around having to update the other columns?
UPDATE
statement here, notINSERT
. If that's the case, please remember to use aWHERE
clause in that statement so it only puts the data exactly where you need it to go. – Jon Seigel Jul 8 '14 at 17:31