I have a table with a float
column. All values in this column for all records are NULL
.
I want to change the data type to datetime
.
I executed the query:
ALTER TABLE MyTable ALTER Column MyColumn DATETIME NULL
It works. But when I try to revert the changes by setting the data type to float
:
ALTER TABLE MyTable ALTER Column MyColumn FLOAT NULL
I get the exception:
Implicit conversion from data type datetime to float is not allowed. Use the CONVERT function to run this query.
Note that column MyColumn is null for all records.