SQL Server 中更改decimal 的Column 为 date 报错:Operand type clash: decimal is incompatible with date

0
你好,
表中某个Column开始为Decimal 后来要改成 Date 执行如下语句:
alter table customer alter column DateofBirth date
报错:Operand type clash: decimal is incompatible with date
有没有好的解决方案,还是要删除Column 后重新添加?谢谢
已邀请:
0

cjf7828 2015-10-09 回答

全改成Null后,更新还是报同样的错,删除全表数据也不行,一样报错信息。
是不是只有删除字段,重新添加?
0

- 取是能力,舍是境界 2015-10-09 回答

修改字段类型的前提是数据能默认转换。如果这列数据已无用,用可以更新成NULL然后再修改列类型

要回复问题请先登录注册