Computer Science, asked by shyamullangwar3, 4 months ago

37.Differentiate between ALTER and UPDATE commands.

Answers

Answered by ashu0itkm
2

Answer:

ALTER COMMANDS PROVIDE THE MODIFICATIONS OF TABLE.

BUT UPDATE COMMAND PROVIDE THE MODIFICATIONS IN ROW OF DATA.

Answered by Equestriadash
4

The ALTER command is a DDL [Data Definition Language] command while the UPDATE command is a DML [Data Manipulation Language] command.

The Alter command is used to make modifications relating to the structure/definition of the table while the UPDATE command is used to make modifications relating to the data/records in the table.

An example of both their usages:

ALTER TABLE Movies ADD(Rating int(5)); will add a column named 'Rating' to the table names 'Movies'.

UPDATE Movies SET MName = 'The Bourne Identity' WHERE Rating = 4; will change the movie name to 'The Bourne Identity' where the rating is 4 in the table named 'Movies'.

Similar questions