postgreSQL 查询语句
select * from table where name in (select name from table2) 等效于 select * from table where exists (select name from table2)
后者查询速度更快
clock_timestamp() 返回当前真实的时间
coalesce(nullif(rest,''),'0') as new_rest # 将rest字段的空值替换成0
select coalesce(nullif(rest,''),'0') as new_rest from table
to_char(test_time,'YYYY/MM/DD') # 转换成日期格式的字符串
to_timestamp(query_time,'YYYY/MM/DD HH24/MI/SS') # 转换成日期

浙公网安备 33010602011771号