Update is a SQL command that is used to update existing records in a database, while alter is a SQL command that is used to modify, delete or add a column to an existing table in a database.
Update is a DML statement whereas alter is a DDL statement. Alter command modifies the database schema, while update statement only modifies records in a database without modifying its structure.
Used to update existing records in a Database.
It is a DML Command, means commands that are used to manage data without altering the DB Schema are called DML statements.
UPDATE Table_name SET Col1name=value1, col2name = val2,WHERE ColXname = some value
Used to modify, delete or add a column to an existing table in a Database.
It is a DDL command, means commands that are used to define the structure of a DB (DB Schema) are called DDL statements.
ALTER TABLE Table_name ADD newColname dataTypeofNewCol or to delete a col
DROP Colname or change datatype of an existing col in table
ALTER Column Colname newDatatype