sql-inserts-Q&A Flashcards
1
Q
How do you add a row to a SQL table?
A
insert into “products” (“name”, “description”, “price”, “category”)
values (‘Ostrich Pillow’, ‘Feel comfy and cozy!’, 99, ‘self care’);
2
Q
What is a tuple?
A
A grouped together set of values
3
Q
How do you add multiple rows to a SQL table at once?
A
insert into “products” (“name”, “description”, “price”, “category”)
values (‘Ostrich Pillow’, ‘Feel comfy and cozy!’, 99, ‘self care’),
(‘Tater Mitts’, ‘Scrub some taters!’, 6, ‘cooking’)
4
Q
How do you get back the row being inserted into a table without a separate select statement?
A
Returning *;