156k views
3 votes
What is the purpose of the SQL statement "DELETE FROM celebs"?

A) To insert data into the "celebs" table.
B) To update records in the "celebs" table.
C) To remove records from the "celebs" table.
D) To retrieve data from the "celebs" table.

1 Answer

5 votes

Final answer:

The purpose of the SQL statement "DELETE FROM celebs" is to remove records from the "celebs" table. It deletes all rows unless a WHERE clause specifies certain rows to delete.

Step-by-step explanation:

The SQL statement "DELETE FROM celebs" is used to remove records from the "celebs" table.

This command will delete all rows from the table, unless it is accompanied by a WHERE clause that specifies which rows to delete.

For example, DELETE FROM celebs WHERE id=1 would remove only the row where the id column has the value of 1. It's important to use this command with caution because once the data is deleted, it cannot be easily recovered unless there is a backup in place. The DELETE command is primarily used to manage and maintain the data within a database efficiently.

User Josh Bodah
by
8.8k points