精度即數的有效數字個數
2.5的有效數字個數是2,但是053.2的有效數字個數是3
標度是小數點的位數
例如numeric(2,1),即這個數必須是兩位,並且小數后面最多有一位,多出來的小數會被四舍五入
可以很容易的確定出numeric的范圍,即-10(精度-標度)到10(精度-標度)次方之間,不包括兩頭
create table test (num numeric(2,1)); insert into test values (2.2); num ----- 2.2 insert into test values (2.26); num ----- 2.3 insert into test values (10); ERROR: numeric field overflow DETAIL: A field with precision 2, scale 1 must round to an absolute value less than 10^1.
