In this article we will learn about the Azure SQL alter statement. In the previous article we have learned how create and connect to the Azure SQL database. If you are new to the Azure SQL, then please watch my following videos on the Azure SQL database.
How To Create Azure SQL DataBase
How To Connect Azure SQL DataBase Using SQL Management Studio
What is SQL Alter Table Statement?
Alter statement used to modify the structure of the existing table. The alter statement used is to add, drop the table column. It can also be used to change the data types of the column etc.
Let us consider we have the table having name Employee in our Azure SQL Server database having the following records,
Add Column To Existing Table Using Alter Statement
The following SQL query will add the new column Salary into the existing table.
You can alter the multiple columns at a time, the following query will alter the multiple columns of the existing table.