Knowledge Walls
Gopal Rao
Mumbai, Maharashtra, India
Passcode:
How to add a new column to table in SQL in Queries of SQL Queries
3058 Views
Hints 
Add new column query used to add a column to a existing table in database.Table has columns and rows structure.When creating a column given parameters are column names and its datatype, size of the column.

In the following example you can able to see the parameters.Data types -int,nvarchar,varchar,datetime,double etc..,
Syntax
alter table tableName
add columnName dataType
Example
Using the ALTER TABLE statement, add a new column named shipregion to the Orders table.
The fields should be nullable and contain integers.

alter table Orders
add shipregion int;
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details