Alter table to add column : Add Column « Table « SQL Server / T-SQL






Alter table to add column


1> -- 
2>
3> CREATE TABLE Appointment
4>    (   AppointmentID     Int
5>        , Description     VarChar(50)
6>        , StartDateTime   DateTime
7>        , EndDateTime     DateTime
8>        , Resource        VarChar(50) Null
9>    )
10> GO
1>
2> ALTER TABLE Appointment
3> ADD LeadTime SmallInt Null
4> GO
1>
2> drop table Appointment
3> GO
1>
           
       








Related examples in the same category

1.Add columns to a table
2.Add to columns to a table then check the table structure