In many situations we need to modify the table definition in database. I am showing how to add a Column to a Table.
Syntax: ALTER TABLE TableName add columnName DataType NULL/NOT NULL
Example: ALTER TABLE Employee add usercategory varchar(50) NULL
in code we are adding a new column usercategory table. Now we are adding a primary key in table.
Syntax: ALTER TABLE TableName add PRIMARY KEY(ColumnName)
Example: ALTER TABLE AddressType add PRIMARY KEY(AddressTypeID)