Share on Facebook

Monday, February 21, 2011

Cannot alter column 'X' because it is 'timestamp'.

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

No comments:

Related Posts Plugin for WordPress, Blogger...