+ 7

Can anyone mention to me the main difference between alter and update???

Sql

20th May 2019, 7:04 AM
Yeabsira Mekuria
Yeabsira Mekuria - avatar
2 odpowiedzi
+ 22
ALTER is used when you need to modify the structure of a table in your database(ex: adding phone number column to employee table) , but UPDATE is used when you need to update or edit some data (for example: you have a table called employees that holds the information about employees of a company and some employee has changed his address and you need to insert this update to the corresponding record in the table)
20th May 2019, 9:35 AM
Nour Abu Assaf
Nour Abu Assaf - avatar
+ 13
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. I hope helpfulness
20th May 2019, 7:30 AM
Mawlood Fareq
Mawlood Fareq - avatar