1.3.2 SQL (deleting record , Deleting tables) Flashcards

1
Q

What does the command DELETE do?

A

removes data from a database table.

DELETE FROM users
WHERE age < 18;
(deletes all users younger than 18 from the ‘users’ table)

DELETE FROM users
WHERE name=”John”;
(deletes a record where the name is John)

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

what does the command DROP do?

A

it deletes tables from a database.

DROP TABLE users;
(deletes the ‘users’ table)

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