Dataworks(Maxcompute)
- 获取昨天日期
select replace(date_add(getdate(),-1),'-','')
Hologres(pgsql)
- pg_typeof()类似python中的type()函数,用于获取数据类型
select pg_typeof(to_char(CURRENT_TIMESTAMP - '1 days'::interval, 'YYYY-mm-dd'::text)::date)
- 获取昨天日期
select to_char(CURRENT_TIMESTAMP - '1 days'::interval, 'YYYYmmdd'::text)
select to_char(now()::date - 1, 'yyyymmdd'::text)
标签:CURRENT,常用,text,char,pg,SQL,date,一些,select
From: https://www.cnblogs.com/thx2199/p/16830983.html