Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (6.1k points)
In MySQL, I realised that update is used to update a record or row in a table. Then what does alter do that is so different?

Appears like both are the same.

1 Answer

0 votes
by (12.7k points)
edited by

ALTER is a Data Definition Language (DDL) statement. Whereas UPDATE is a Data Manipulation Language(DML) statement. 

ALTER will be used to update the structure of the table (add/remove field/index etc). Whereas UPDATE will be used to update data.

Want to become an expert in SQL? Join the SQL course fast!

Watch the below SQL video tutorial to gain more knowledge on SQL...

Related questions

0 votes
1 answer
asked Dec 8, 2020 in SQL by Appu (6.1k points)
0 votes
1 answer
asked Jul 16, 2019 in SQL by Tech4ever (20.3k points)

Browse Categories

...