on 06-23-2016 7:40 PM
Hello guys,
I wonder what datatype you are using to numeric values. DECIMAL or NUMERIC?
Which one is recommended?
Thanks!
Both are the same type under the covers. Just ensure you use only the neccesary scale and precision you need for storage.
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.