sql-insert/update/delete Flashcards
1
Q
How do you add a row to a SQL table?
A
insert into statement
2
Q
What is a tuple?
A
a list of values
3
Q
How do you add multiple rows to a SQL table at once?
A
add multiple tuples separated by commas
4
Q
How do you get back the row being inserted into a table without a separate select statement?
A
returning *
5
Q
How do you update rows in a database table?
A
update statement and set clause
6
Q
Why is it important to include a where clause in your update statements?
A
so that it targets a specific row and not all rows
7
Q
How do you delete rows from a database table?
A
delete from statement
8
Q
How do you accidentally delete all rows from a table?
A
only putting delete statement