Test Index
Structured Query Language (SQL)
© examsnet.com
Question : 56 of 58
Marks:
+1,
-0
(i) A SQL table ITEMS contains the following columns :INO, INAME, QUANTITY, PRICE, DISCOUNTWrite the SQL command to remove the column DISCOUNT from the table. [1](ii) Categorize the following SQL commands into DDL and DML :CREATE, UPDATE, INSERT, DROP [2]
[CBSE 2022 Code 91]
Solution:
(i)
ALTER TABLE ITEMS DROP COLUMN DISCOUNT;(
ALTER TABLE ... DROP removes a column from an existing table; the keyword COLUMN is optional.)(ii)DDL (Data Definition Language, changes the structure of tables): CREATE, DROPDML (Data Manipulation Language, changes the data in tables): UPDATE, INSERT© examsnet.com
Go to Question: