什么将 Oracle 数据库的 Number(4) 等同于 MySQL 数据类型?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2472451/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What would be equivalent of Number(4) of Oracle database to MySQL Datatype?
提问by Rachel
What would be equivalent of Number(4) of Oracle database to MySQL Datatype ?
什么将 Oracle 数据库的 Number(4) 等同于 MySQL 数据类型?
回答by Leniel Maccaferri
In Oracle:
在甲骨文中:
The NUMBER datatype stores fixed and floating-point numbers. Numbers of virtually any magnitude can be stored and are guaranteed portable among different systems operating Oracle, up to 38 digits of precision.
NUMBER 数据类型存储定点数和浮点数。可以存储几乎任何数量级的数字,并保证在运行 Oracle 的不同系统之间可移植,精度高达 38 位。
7,456,123.89 as NUMBER(9) is stored as 7456124.
7,456,123.89 作为 NUMBER(9) 存储为 7456124。
In MySQL:
在 MySQL 中:
You could use any of the following datatypes since you don't want to store the decimal part of the value...
您可以使用以下任何数据类型,因为您不想存储值的小数部分...
SMALLINT( ) -32768 to 32767 normal 0 to 65535 UNSIGNED.
MEDIUMINT( ) -8388608 to 8388607 normal 0 to 16777215 UNSIGNED.
INT( ) -2147483648 to 2147483647 normal 0 to 4294967295 UNSIGNED.
BIGINT( ) -9223372036854775808 to 9223372036854775807 normal 0 to 18446744073709551615 UNSIGNED.