+ 5
What is the difference between Alter and Update ?
6 Antworten
+ 6
Alter is DDL command , it is used to change in the structure of the table.
As this is auto committed it is very difficult to rollback.
Update is DML command , it is used to make changes. the rows (tuple ) values of the table.
Easy to rollback.
+ 2
ALTER is used for changing table general properties such as columns, data types, names of columns, etc. For example you want to change the data type of column "name" from text to catch at.
UPDATE is used to change values of data in already existing columns in a table. For example you want to change John's age from 20 to 25, you use update because it is just the value in a cell you are changing.
+ 2
ALTER used for adding or dropping columns,constraints..
UPDATE is used to change the existing value
+ 1
ALTER is used to add data that was not already there to a table, while UPDATE is used to change already existing data in a table. You can ALTER a table to include the age of students if that wasn't there already, and you can UPDATE a table to change the name column to firstname column. Switched terms earlier
0
ALTER is use to add new columns / values where as UPDATE is used to change the current value in the colune.. its use to update the stored value.
0
update is used to alter existing values; alter to insert/delete columns, entries etc