SQL Command to Remove a Relation: Correct Choice and Conceptual Distinctions
In relational database terminology, a relation is removed from the database schema using DROP TABLE—not by deleting rows.
- Correct option: (i) Drop table
- Why the other options are wrong:
- (ii) Delete removes rows from an existing table; it does not remove the relation (table) itself. DELETE
- (iii) Purge is not a standard SQL command for removing a relation; it may appear in vendor-specific contexts (and usually refers to deeper cleanup in specific systems), but it is not the standard answer for “remove a relation”.
- (iv) Remove is not an SQL command for this purpose.
Visual summary: what each command affects
DROP TABLE vs DELETE (SQL basics)
Key terminology
- DDL
- DML
- Schema
- Table
In this question, “remove a relation” is best interpreted as remove the table (schema object). That is the job of DDL: DROP TABLE.
Decide which SQL command matches the question
- 1Step 1
If the question says “remove a relation/table,” that points to schema removal (DDL). If it says “remove records/rows,” that points to data removal (DML).
- 2Step 2
Use DROP TABLE for removing the relation; use DELETE for removing rows.
- 3Step 3
“Purge” and “Remove” are not the standard SQL commands for dropping relations; therefore they do not match the question’s intent.
- 4Step 4
Therefore the correct option is (i) Drop table.
What each option actually does (conceptually)
- (i) Drop table: removes the table/relation from the database schema (DDL). DROP TABLE
- (ii) Delete: removes specific rows from an existing table (DML). DELETE
- (iii) Purge: not a standard SQL command for dropping a relation.
- (iv) Remove: not a standard SQL command for dropping a relation.
How commands affect the relation vs its data
DDL removes the table (relation); DML removes only rows (data).
Pro Tip: Use intent words
In exam questions, “remove a relation/table” typically means schema removal → DROP TABLE; “remove rows/records” means DELETE.
Common confusion: DELETE does not drop the relation
Running DELETE empties rows but leaves the table (relation) intact, so the relation is not “removed.”
FAQ: Edge cases and related commands
Relation vs Data Removal (Schema vs Rows)
DROP TABLE
Schema removal (DDL)Deletes the table/relation definition (relation gone)."
DELETE FROM
Row removal (DML)Deletes selected rows; the table/relation remains."
TRUNCATE
Bulk row removal (contrast)Removes all rows quickly; relation/table remains."
Knowledge Check
Which command is used to remove a relation (table) from SQL?