+ 5

What is the difference between Alter and Update ?

18th Jul 2016, 9:23 PM
Suryaprakash Tiwari
Suryaprakash Tiwari - avatar
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.
18th Jul 2016, 9:25 PM
Suryaprakash Tiwari
Suryaprakash Tiwari - avatar
+ 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.
24th Jul 2016, 12:36 PM
Awwal Ishiaku
Awwal Ishiaku - avatar
+ 2
ALTER used for adding or dropping columns,constraints.. UPDATE is used to change the existing value
17th Sep 2016, 5:20 PM
Raghavendra
+ 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
19th Jul 2016, 10:12 AM
Leo Kuku
Leo Kuku - avatar
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.
21st Nov 2016, 3:52 AM
Arun Bhandari
Arun Bhandari - avatar
0
update is used to alter existing values; alter to insert/delete columns, entries etc
11th Feb 2017, 3:41 PM
Nathan Algren