Test Index

Structured Query Language (SQL) Get it on Google PlayDownload on the App Store CBSE Board Videos

© examsnet.com
Question : 56 of 58
Marks: +1, -0
(i) A SQL table ITEMS contains the following columns :
INO, INAME, QUANTITY, PRICE, DISCOUNT
Write 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, DROP
DML (Data Manipulation Language, changes the data in tables): UPDATE, INSERT
© examsnet.com
Advertisements
Go to Question: