Session Ready
Exercise

Deleting data and dropping table

Besides being able to CREATE, INSERT, or UPDATE, it is also important to know how to DELETE and DROP a table. With DELETE, it is possible to delete a certain line of the table and with DROP TABLE, it is possible to erase the entire table and its definition.

The syntax for both operators is as follows.

Delete the line where lineID = 1 from the Employee table:

DELETE FROM Employee 
WHERE lineID = 1;

Drop the entire Employee table:

DROP TABLE Employee

Your task is to delete some lines of the previously defined Person table and finally, to drop the entire table.

Instructions 1/2
undefined XP
  • 1
  • 2
  • Delete the person with an ID equal to 1 in the table.
  • Delete the person whose last name is Jackson.