Imran
Imran

Reputation: 11654

what's the purpose/point of the REAL() Datatype in mysql?

what's the purpose/point of the REAL() Datatype in mysql? You have float,double and decimal which i understand but where does the "real" datatype come into it? Any ideas?

Thank you in advance ;-)

is real the same as float or double?

Upvotes: 2

Views: 4559

Answers (3)

Stephen
Stephen

Reputation: 18964

From the documentation:

MySQL also treats REAL as a synonym for DOUBLE PRECISION (a nonstandard variation), unless the REAL_AS_FLOAT SQL mode is enabled.

http://dev.mysql.com/doc/refman/5.1/en/numeric-types.html

Upvotes: 5

Will A
Will A

Reputation: 25008

REAL is just another name for DOUBLE PRECISION.

Upvotes: 3

Daniel Vassallo
Daniel Vassallo

Reputation: 344431

MySQL treats REAL as a synonym for DOUBLE, unless the REAL_AS_FLOAT SQL mode is enabled.

Source: MySQL 5.1 Reference Manual - Numeric Types

Upvotes: 6

Related Questions