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 生成科学


基础教程推荐
- 在 VB.NET 中更新 SQL Server DateTime 列 2021-01-01
- 如何在 SQL Server 的嵌套过程中处理事务? 2021-01-01
- 将数据从 MS SQL 迁移到 PostgreSQL? 2022-01-01
- SQL Server:只有 GROUP BY 中的最后一个条目 2021-01-01
- ERROR 2006 (HY000): MySQL 服务器已经消失 2021-01-01
- SQL Server 2016更改对象所有者 2022-01-01
- 无法在 ubuntu 中启动 mysql 服务器 2021-01-01
- 使用pyodbc“不安全"的Python多处理和数据库访问? 2022-01-01
- Sql Server 字符串到日期的转换 2021-01-01
- SQL Server 中单行 MERGE/upsert 的语法 2021-01-01