SQL Server 2008 - Alter column to Varchar from Float produces Scientific Notation(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 生成科学记数法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:SQL Server 2008 - 将列从 Float 更改为 Varchar 生成科学


基础教程推荐
- 带更新的 sqlite CTE 2022-01-01
- 从字符串 TSQL 中获取数字 2021-01-01
- CHECKSUM 和 CHECKSUM_AGG:算法是什么? 2021-01-01
- 使用 VBS 和注册表来确定安装了哪个版本和 32 位 2021-01-01
- MySQL根据从其他列分组的值,对两列之间的值进行求和 2022-01-01
- MySQL 5.7参照时间戳生成日期列 2022-01-01
- ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和 2021-01-01
- 带有WHERE子句的LAG()函数 2022-01-01
- while 在触发器内循环以遍历 sql 中表的所有列 2022-01-01
- 如何在 CakePHP 3 中实现 INSERT ON DUPLICATE KEY UPDATE aka upsert? 2021-01-01