Match the following clauses with their respective functions.
| Clause | Function |
|---|---|
| ALTER | Insert the values in a table |
| UPDATE | Restrictions on columns |
| DELETE | Table definition |
| INSERT INTO | Change the name of a column |
| CONSTRAINTS | Update existing information in a table |
| DESC | Delete an existing row from a table |
| CREATE | Create a database |
Sort the clauses by what they act on: structure-changers (ALTER, CREATE, DESC, CONSTRAINTS) versus data-changers (INSERT INTO, UPDATE, DELETE). Once you see that split, each clause pairs with exactly one function.
The correct matching
| Clause | Correct function |
|---|---|
| ALTER | Change the name of a column |
| UPDATE | Update existing information in a table |
| DELETE | Delete an existing row from a table |
| INSERT INTO | Insert the values in a table |
| CONSTRAINTS | Restrictions on columns |
| DESC | Table definition |
| CREATE | Create a database |
Each pairing, proven with one line of SQL
ALTER TABLE student CHANGE name fullname VARCHAR(30); -- ALTER: renames column 'name'
UPDATE student SET class = 12 WHERE rollno = 101; -- UPDATE: changes existing data
DELETE FROM student WHERE rollno = 101; -- DELETE: removes an existing row
INSERT INTO student VALUES (101, 'Aaliya', 11); -- INSERT INTO: adds values as a new row
CREATE DATABASE school; -- CREATE: makes a new database
DESC student; -- DESC: shows the table's definition
DESC student; (short for DESCRIBE) prints the table definition — each column's name, data type, whether it can be NULL, and its key status:
+----------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------+-------------+------+-----+---------+-------+
| rollno | int | NO | PRI | NULL | |
| fullname | varchar(30) | YES | | NULL | |
| class | int | YES | | NULL | |
+----------+-------------+------+-----+---------+-------+
CONSTRAINTS are not a command you run but the rules that restrict what a column may hold — PRIMARY KEY, NOT NULL, UNIQUE, DEFAULT, CHECK, FOREIGN KEY — declared inside CREATE TABLE/ALTER TABLE.
Why the split works: ALTER, CREATE, DESC and constraints belong to DDL (they define or describe structure), while INSERT INTO, UPDATE, DELETE belong to DML (they manipulate the rows inside that structure). Matching becomes automatic once you ask "does this touch the table's shape, or its contents?"
ALTER → Change the name of a column · UPDATE → Update existing information in a table · DELETE → Delete an existing row from a table · INSERT INTO → Insert the values in a table · CONSTRAINTS → Restrictions on columns · DESC → Table definition · CREATE → Create a database.
Unlock everything free for 14 days
- Full step-by-step solutions
- Concept-first explanations
- Methods, shortcuts & mistakes
- PYQ mapping + timed mock tests
Full access for 14 days. No credit card required.