cancel
Showing results for 
Search instead for 
Did you mean: 

Decimal or Numeric

Former Member
0 Kudos

Hello guys,

I wonder what datatype you are using to numeric values. DECIMAL or NUMERIC?

Which one is recommended?

Thanks!

Accepted Solutions (0)

Answers (2)

Answers (2)

c_baker
Employee
Employee

Both are the same type under the covers.  Just ensure you use only the neccesary scale and precision you need for storage.

Chris

adriancttnc
Discoverer
0 Kudos

I'd be interested to know whether there is ANY difference between NUMERIC data type and DECIMAL data type (besides the name, of course).
I know that them both have the same description and that they are semantically equivalent, but I am curious why there are two data types that do exactly the same thing instead of just one.

Why is there a description (albeit, the same description) for each instead of having one description under, say, NUMERIC, and under DECIMAL to say 'See NUMERIC data type description'.

RobertWaywell
Product and Topic Expert
Product and Topic Expert

The reasons for having synonyms for the same semantic data type would be due to differences in dialect between databases. In many cases basic data types like decimal or numeric pre-date the ANSI SQL standard, which led to the ANSI standard being written to accept either synonym. Since decimal and numeric are equivalent, it's really easy for a database to add the other name as a synonym.