Written By:- Isha Malhotra
Our Website:-Tech Altum
Our Website:-Tech Altum
Use of
Alter in SQL Server
When we need to modify the definition of
Table then we use alter command. Alter comes under DDL Commands.
To start with alter check the structure of
following table:-
Figure 1
To Add New Column in Table
Suppose I want to add new column for dept.
in this table then we use alter query in following manner:-
alter
table emp
add dept varchar(100)
now run select * from emp
you will get following result:-
Figure 2

