views:

99

answers:

1

What would be equivalent of Number(4) of Oracle database to MySQL Datatype ?

A: 

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.

7,456,123.89 as NUMBER(9) is stored as 7456124.

Oracle Native DataTypes

In 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.

MySql DataTypes

Leniel Macaferi