函数 返回类型 描述 例子
to_char(timestamptext) text 把时间戳转成字符串 to_char(current_timestamp, 'HH12:MI:SS')
to_char(intervaltext) text 把间隔转成字符串 to_char(interval '15h 2m 12s', 'HH24:MI:SS')
to_char(inttext) text 把整数转成字符串 to_char(125, '999')
to_char(double precisiontext) text 把实数或双精度转成字符串 to_char(125.8::real, '999D9')
to_char(numerictext) text 把数字转成字符串 to_char(-125.8, '999D99S')
to_date(texttext) date 把字符串转成日期 to_date('05 Dec 2000', 'DD Mon YYYY')
to_number(texttext) numeric 把字符串转成数字 to_number('12,454.8-', '99G999D9S')
to_timestamp(texttext) timestamp with time zone 把字符串转成时间戳 to_timestamp('05 Dec 2000', 'DD Mon YYYY')

将字符串转换成double类型(to_number())

 

select count(*) as tt, sum(to_number( length, '999999.9999') ) as x, sum(to_number( area, '9999999.9999') ) as x from szt_road

相关文章:

  • 2023-03-21
  • 2021-09-27
  • 2022-12-23
  • 2021-11-14
  • 2022-12-23
  • 2021-08-30
  • 2021-06-29
猜你喜欢
  • 2022-12-23
  • 2021-10-20
  • 2021-11-12
  • 2022-12-23
  • 2022-12-23
  • 2021-08-16
相关资源
相似解决方案