postgreSQL保留小数

数字:postgres=# select round( cast ( 1 as numeric )/ cast( 4 as numeric),2);
字符:postgres=# SELECT substr(CAST (1234 AS text), 3,1);

不确定类型:select round(字段1::numeric,1) as 字段1,round(字段2,2) as 字段2 from table

你可能感兴趣的:(web,postgresql,数据库,database)