EnjoySharePoint YouTube Channel

Add new column to existing table in sql server 2008

In this post, we will discuss how to add a new column to an existing table in SQL server 2008.

Get Office 365 Enterprise E3 Or Business Premium Subscription & Try out all the features

You can also check my previous posts on

A solution for error Saving changes is not permitted sql 2008

WCF tutorial and example in C#.Net

Left outer join and Right outer join in SQL Server.

You can add columns easily to an existing table in the database.

Below is a query which will add a DateTime type column which will not accept a NULL value and put default value as the current DateTime.

Use TestDB
ADD ModifiedDate DateTime NOT NULL DEFAULT(Getdate())

Below is the query that will add a varchar type column to the table which can take NULL values.

Use TestDB
ADD Location varchar(200)null

Check the figure to know about the table structure.

Check out Best Alternative to InfoPath -> Try Now
You May Also like the Following SharePoint Tutorials:

About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

View all posts by Bijay Kumar →