我是PostgreSQL的新手(我已经使用MS SQL很多年了),需要将包含秒时间的数字列转换为HH:MM:SS格式.
我在谷歌上搜索了一下,发现to_char(interval '1000s', 'HH24:MI:SS')
是有效的,所以我try 在我的域名中使用这个:
to_char(fieldname, 'HH24:MI:SS')
表示错误cannot use "S" and "PL"/"MI"/"SG"/"PR" together
to_char(fieldname::interval, 'HH24:MI:SS')
表示错误cannot cast type numeric to interval
有人能告诉我哪里出了问题吗?