Summary - INSERT
- SQL course
- Beginner
- Lesson 76/115
- 5 min
Transfer data with single and multi-row INSERT.
Summary - INSERT
In this group you learned INSERT basics, multi-row, INSERT SELECT and DEFAULT. Adding data is now easy.
INSERT INTO products (id, name, price)
VALUES (7, 'Kitap', 30), (8, 'Defter', 12);This query adds two products in one query.
The values given with VALUES are inserted into products as new rows.
Practice Summary - INSERT
Insert id=9, name='Pen', price=5 into products.
Starter code
-- summary insert
INSERT INTO products
VALUESSample solution
INSERT INTO products (id, name, price)
VALUES (9, 'Kalem', 5)Expected output
1 satır eklendi
Questions and answers
Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.
1 What separates value sets in multi-row insert?
- A semicolon
- A colon
- A comma Correct answer
- A space
Explanation: Value sets are separated by commas.
2 Summary - INSERT: match the terms
| Term | Meaning |
|---|---|
INSERT |
insert |
VALUES |
values |
SELECT |
select |
DEFAULT |
default |