MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

SQL

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which SQL statement is used to delete data from a database?
A
REMOVE
B
COLLAPSE
C
DELETE
D
DROP
Explanation: 

Detailed explanation-1: -The DELETE statement is used to delete existing records in a table.

Detailed explanation-2: -The DROP DATABASE statement is used to drop an existing SQL database.

Detailed explanation-3: -The DROP TABLE statement is used to drop an existing table in a database.

Detailed explanation-4: -Use DELETE FROM with the name of the table from which you’d like to delete a row. In WHERE, write the condition specifying the row. If you have a specific row in mind, it is best to write the condition using the column containing unique values.

Detailed explanation-5: -DELETE is a DML (Data Manipulation Language) command. This command removes records from a table. It is used only for deleting data from a table, not to remove the table from the database.

There is 1 question to complete.