If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

SQL: INSERTing values in tables

Use INSERT to insert rows into a table. You can either specify every column value in parentheses after the VALUES keyword, or you can specify a comma-separated list of columns name before VALUES, and only specify those column values in the parentheses after.
If you don't specify the value for a column that's the primary key, then the SQL engine will fill it in automatically with a unique id. If you don't specify the value for other columns, then SQL will fill them in with either NULL or their default value, if one was specified.
▶️ You can also learn about this in our Creating a table and inserting data talkthrough.

Want to join the conversation?

No posts yet.