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 生成科学
基础教程推荐
- 在 MySQL 中:如何将表名作为存储过程和/或函数参数传递? 2021-01-01
- 在多列上分布任意行 2021-01-01
- 如何在 SQL 中将 Float 转换为 Varchar 2021-01-01
- 什么是 orradiag_<user>文件夹? 2022-01-01
- MySQL 中的类型:BigInt(20) 与 Int(20) 2021-01-01
- 二进制文件到 SQL 数据库 Apache Camel 2021-01-01
- mysql选择动态行值作为列名,另一列作为值 2021-01-01
- oracle区分大小写的原因? 2021-01-01
- 表 './mysql/proc' 被标记为崩溃,应该修复 2022-01-01
- 如何根据该 XML 中的值更新 SQL 中的 XML 2021-01-01
