37.Differentiate between ALTER and UPDATE commands.
Answers
Answered by
2
Answer:
ALTER COMMANDS PROVIDE THE MODIFICATIONS OF TABLE.
BUT UPDATE COMMAND PROVIDE THE MODIFICATIONS IN ROW OF DATA.
Answered by
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