Computer Science, asked by Anonymous, 5 months ago

What is the use of UPDATE statements in SQL? How is it different from ALTER statements? ​

Answers

Answered by asinsarabiga
10

Answer:

ALTER is a DDL (Data Definition Language) statement. Whereas UPDATE is a DML (Data Manipulation Language) statement. ALTER is used to update the structure of the table (add/remove field/index etc). Whereas UPDATE is used to update data.

Answered by shubhamkrcity36
1

UPDATE statement is used for modifying the existing records in a table. The UPDATE command specifies the rows to be changed using the WHERE clause and the new data using SET keywords.

Syntax: UPDATE <table name>

SET <field name>=<value or expression >

WHERE <criteria>;

UPDATE

  1. It modifies the existing data of a database.
  2. It is DML.
  3. It can only modify one or more records in a table.

ALTER

  1. It modifies existing structure of a database.
  2. It is DDL.
  3. It can add, delete or modify column of a table.

I HOPE IT IS HELPFUL FOR YOU.

PLEASE MARK ME AS A BRAINLIST

THANK YOU

Similar questions