By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
create table test (f1 double, f2 double(10,5), f3 decimal(10,5))
insert into test values (5.12345678, 5.12345678, 5.12345678)
select * from test
f1 | f2 | f3 |
---|---|---|
5.12345678 | 5.12346 | 5.12346 |
select column_name, DATA_TYPE,
NUMERIC_PRECISION,
NUMERIC_SCALE
from information_schema.columns
where table_name = 'test'
COLUMN_NAME | DATA_TYPE | NUMERIC_PRECISION | NUMERIC_SCALE |
---|---|---|---|
f1 | double | 22 | null |
f2 | double | 10 | 5 |
f3 | decimal | 10 | 5 |