SQL fixed vs floating point literals

Viewed 22

Is there a standard in SQL as to whether a number typed in as something like the following will be fixed or floating point?

SELECT 1.2 + 7.8

In a programming language, I am so used to fractional numbers being represented as FP, and usually having to import a separate library (if its not included in stdlib) to work with decimals. But in SQL, it seems that there are variations in how it's sometimes represented, for example in postgres 1.1 would default to NUMERIC whereas in BigQuery 1.1 would default to FP. Is there a standard or guideline on how decimal-numbers should be treated in SQL, or it's entirely up to the implementation. And if the latter, is there a consensum on what's the better approach?

0 Answers
Related