Advertisements
Advertisements
Question
Differentiate between update and alter table command.
Distinguish Between
Advertisements
Solution
| Basis of Difference | UPDATE | ALTER TABLE |
|---|---|---|
| Purpose | Modifies data values | Modifies table structure |
| Affects | Rows and column values | Columns and constraints |
| Example | UPDATE student SET marks=90; |
ALTER TABLE student ADD city VARCHAR(20); |
| Type | DML command | DDL command |
| WHERE clause | May be used | Not used for selecting rows |
shaalaa.com
Is there an error in this question or solution?
