2012-02-27 150 views

回答

2

還有沒有 PostgreSQL的區別。 Per documentation:

類型decimalnumeric是等價的。這兩種類型都是SQL標準的一部分。

0

引自:https://www.postgresql.org/message-id/[email protected]

沒有任何區別,Postgres的。有兩個類型名稱 ,因爲SQL標準要求我們接受這兩個名稱。在快速 看在標準看來,唯一的區別是這樣的:

 17)NUMERIC specifies the data type exact numeric, with the decimal 
     precision and scale specified by the <precision> and <scale>. 

    18)DECIMAL specifies the data type exact numeric, with the decimal 
     scale specified by the <scale> and the implementation-defined 
     decimal precision equal to or greater than the value of the 
     specified <precision>. 

即十進制數的實現是允許讓更多的數字 比請求到小數點的左側。 Postgres不會 行使這種自由,所以這些類型的 我們沒有區別。

 regards, tom lane 
相關問題