Skip to content
Exercises · Q1
Q.

Match the following clauses with their respective functions.

ClauseFunction
ALTERInsert the values in a table
UPDATERestrictions on columns
DELETETable definition
INSERT INTOChange the name of a column
CONSTRAINTSUpdate existing information in a table
DESCDelete an existing row from a table
CREATECreate a database
West Bengal WbchseTextbookSubjective· 2mImportance★★★★★est
60% · 27/45 Questions
✓ Free question

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

ClauseCorrect function
ALTERChange the name of a column
UPDATEUpdate existing information in a table
DELETEDelete an existing row from a table
INSERT INTOInsert the values in a table
CONSTRAINTSRestrictions on columns
DESCTable definition
CREATECreate 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?"

✓Final answer

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.