Which SQL command removes records from a database?

Prepare for the OCR GCSE Computer Science Paper 2 exam. Practice with diverse questions, flashcards, and detailed explanations. Boost your confidence and ace your test!

The command that removes records from a database is DELETE. This command is specifically designed to remove one or more rows from a specified table based on a given condition. When executed, the DELETE command can affect all rows within the table if no condition is specified, or just those that meet a certain criterion if a WHERE clause is included.

Other commands serve different purposes within SQL. DROP is used to remove entire tables, views, or databases, not just the records contained within them. UPDATE is intended for modifying existing records in a table, altering specified fields rather than removing them. INSERT is used to add new records to a database table, not to delete any existing data. Thus, DELETE stands out as the appropriate command for removing records from a database.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy