sql-insert/update/delete Flashcards

1
Q

How do you add a row to a SQL table?

A

insert into statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a tuple?

A

a list of values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you add multiple rows to a SQL table at once?

A

add multiple tuples separated by commas

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you get back the row being inserted into a table without a separate select statement?

A

returning *

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do you update rows in a database table?

A

update statement and set clause

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do you delete rows from a database table?

A

delete from statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you accidentally delete all rows from a table?

A

only putting delete statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly