. .

MySQL

» PHP » MySQL » MySQL

MySQL ANSI SQL92. (NUMERIC, DECIMAL, INTEGER SMALLINT), (FLOAT, REAL DOUBLE PRECISION). INT INTEGER, DEC DECIMAL.

NUMERIC DECIMAL MySQL, SQL92. , , . ( ) , :


salary DECIMAL(9,2)

9 (, precision) , , 2 (, scale) , . , , , salary, - -9999999.99 9999999.99 (MySQL 9999999.99 , ).

ANSI SQL92 DECIMAL(p) DECIMAL(p,0). DECIMAL DECIMAL(p,0), p. MySQL DECIMAL/NUMERIC. , .

DECIMAL NUMERIC , , . , ( scale > 0) ( ). scale 0, DECIMAL NUMERIC .

DECIMAL NUMERIC DOUBLE, DECIMAL NUMERIC . , , , . ( , ), MySQL , .

MySQL ANSI SQL92 TINYINT, MEDIUMINT BIGINT, . MySQL (, INT(4)).

, , , , , , , , .

ZEROFILL ( ), .

, , INT(5) ZEROFILL, 4 00004, 36 00036, 12345 12345 .

, , , , , MySQL , MySQL , .

UNSIGNED ( ). , , .

FLOAT , . ANSI SQL92 ( ) FLOAT . MySQL- . FLOAT , MySQL , .

, , FLOAT. , , ( DECIMAL NUMERIC). MySQL , , , . !

REAL DOUBLE PRECISION . ANSI SQL92 MySQL DOUBLE DOUBLE PRECISION. , MySQL 8- . , REAL , DOUBLE PRECISION.

, , MySQL .

, INT -2147483648 2147483647. -9999999999 INT, -2147483648. , 9999999999, 2147483647.

INT UNSIGNED, , 0 4294967295. -9999999999 9999999999, , , 0 4294967296.

, - , warning LOAD DATA INFILE, UPDATE INSERT ( , , warning ).