Inserting Data with INSERT
INSERT adds new rows to a table. This is how data gets into the database.
Basic INSERT Syntax
INSERT INTO table_name (column1, column2, ...)
VALUES (value1, value2, ...);
Exercises
The playground has a "Reset DB" button to restore the original data after you make changes.
Loading exercise...
Loading exercise...
Loading exercise...
INSERT with Products
Let's work with the products table:
Loading exercise...
Loading exercise...
Common Mistakes
- Mismatched columns and values - must be same count, same order
- Forgetting quotes for text values
- Wrong data type - text where number expected
Free Practice
Loading SQL editor...
Try:
- Insert multiple users
- Insert a user with NULL age (omit the column)
- Insert and then query to verify

