Saturday, July 23, 2011

How to Change DataType of TimeStamp Column ?

Datatype of Timestamp column cannot be deleted. Hence it is advised to drop the column and re-create it

For example,

ALTER TABLE [dbo].[PerformanceMaster] DROP COLUMN PerformanceDate
ALTER TABLE [dbo].[PerformanceMaster] ADD PerformanceDate datetime2

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Deep's | Bloggerized by Deep - Deep's Templates | ElearSQL-Server