人气:7171
问答:0
收藏:0
更多实列更多
2021-07-18postgresqlpgsql转int类型
如果超出上限::INT转换失败用cast(substring(b."adCode"::TEXT,1,4) as bigint)select CASE WHEN b."adCode&quo...
2021-03-09postgresqlpostgresql补齐0
左补0函数:lpad()select lpad(‘538’, 6, ‘0’) //解释:538不满6位数时,左变补0,让其达到6位长度右补0函数:rpad()select rpad(‘538’, 6, ‘0’)//解...
2019-05-27postgresqlpostgresql当前时间
Postgresql 当中有四种方式获取当前时间。一:now() 通过now()获取的时间是最完整的时间,包括时区,秒也保留到了6位小数。 select now(); 得到的结果如下 '2014-12-24 ...