Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change Date column to DateTime in SQL Server

I have to change the EventDate column data type from Date to Datetime. When I tried to do it, it failed to save the change with message

Saving changes is not permitted. The changes you have made require the following table to be dropped & recreated. ....

Is there a way that it can be don't with dropping the table? If I drop the table then I will have another issue to deal with when I importing the data as EventID is based on auto increment & ID can't be changed.

Any solution to this issue in SQL Server 2008 ?

like image 333
Learning Avatar asked Aug 14 '26 18:08

Learning


1 Answers

The following steps should help you.

To change this option,

  1. Tools menu
  2. click Options
  3. Designers
  4. Select Table and Database Designers
  5. Clear the check box Prevent saving changes that require the table to be re-created.
like image 70
Pரதீப் Avatar answered Aug 17 '26 14:08

Pரதீப்



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!