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


Well done! You can use the NULL value explicitly in an INSERT statement. To insert Chris of unknown age as a user with an ID of 6, you can use the command:

INSERT INTO user (id, name, Age) 
VALUES (6, 'Chris', NULL);

Or, since the command defines values for all columns in the user table, you can simply use this command:

VALUES (6, 'Chris', NULL);

Which way should you choose: the one presented in the previous exercise or one of the ways shown here? It's entirely up to you! If you want to emphasize that you insert a NULL value, insert it explicitly. If you want to save some typing, omit the column name.


Add the starter Kosovo Bread with ID 10 again to the dish table. This time, explicitly insert a NULL value into the price column.