MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

SQL

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Difference between ALTER Table command and UPDATE command:
A
ALTER is DDL command and is used for modifying the schema of table
B
UPDATE is DML command and isused for modifying the existing data of table
C
Using Alter command any value inside the table can be modified.
D
Using Update command columns of a table can be renamed.
Explanation: 

Detailed explanation-1: -ALTER command in SQL is a DDL (Data Definition Language) statement. It is mainly used for updating the structure of tables in a database by using keywords like add, delete and modify attributes of tables. UPDATE command in SQL is a DML (Data Manipulation Language) statement.

Detailed explanation-2: -ALTER Command is used to add, delete, modify the attributes of the relations (tables) in the database. UPDATE Command is used to update existing records in a database.

Detailed explanation-3: -What is the difference between UPDATE, MODIFY and ALTER in SQL? UPDATE is an example of DML (Data Manipulation Language) statement. As such it is used for modifying/updating the data within a table column or group of columns. ALTER/MODIFY is an example of DDL (Data Definition Language).

Detailed explanation-4: -The synonyms modify and alter are sometimes interchangeable, but modify suggests a difference that limits, restricts, or adapts to a new purpose.

Detailed explanation-5: -Examples of DDL include CREATE, DROP, ALTER, etc. The changes that are caused by issuing DDL commands cannot be rolled back. DML-which stands for Data Manipulation Language which lets you run select, insert, update and delete queries.

There is 1 question to complete.