Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Inserting data
4. Insert partial data
Modifying data
Deleting data


You learn quickly, great!

Sometimes you don't know all the data when you insert information into a database. SQL Server allows you to insert data with values for some columns and omit data for other columns at the same time.

To insert Chris of unknown age as a user with an ID of 6, use the command:

INSERT INTO User (Id, Name) 
VALUES (6, N'Chris');

The new part after the table User, (Id, Name), is the list of column names you will give values to. The expression (6, N'Chris'), in turn, is the list of values for these columns. The number 6 is the value of the first specified column, Id. The text 'Chris' is the value of the second specified column, Name. The value for unknown in SQL Server is NULL. A database inserts NULL values for each column you omit in an INSERT statement.

Warning: Sometimes, the database will not allow you to add incomplete data. This topic is beyond the scope of this course; we talk about it in the Creating Tables in SQL course.


Balkan cuisine is getting popular, so we need another Balkan item on the menu.

Add Kosovo Bread with ID of 10; it's a starter. We have yet to decide on the price, so omit it for now.

Stuck? Here's a hint!


INSERT INTO Dish (Id, Type, Name) 
VALUES (10, N'starter', N'Kosovo Bread');