SQL Server 2008 - 将列从 Float 更改为 Varchar 生成科学记数法 [英] SQL Server 2008 - Alter column to Varchar from Float produces Scientific Notation

查看:51
本文介绍了SQL Server 2008 - 将列从 Float 更改为 Varchar 生成科学记数法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须将表中当前为 Float 的列之一更改为 Varchar,但是当我使用 alter 命令时,它会以科学记数法存储一些较长的数字.

I am having to change one of the columns in table which currently is Float to Varchar, but when I use alter command, it stores some of the longer numbers in Scientific Notation.

我可以避免这种情况吗?

Can I avoid this?

如果没有,有没有办法在以后轻松更新表格以将科学记数法存储为正常整数?

If not, is there a way to easily update the table later to store the scientific notation as normal integer?

谢谢

推荐答案

请查看链接

在没有科学的情况下在 SQL Server 中将浮点数转换为 varchar符号

您可以将浮点数转换为 varchar(max)

You can cast the float to varchar(max)

如何在 SQL Server 中将 float 转换为 varchar

这篇关于SQL Server 2008 - 将列从 Float 更改为 Varchar 生成科学记数法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆