What is PostgreSQL equivalent of SYSDATE from Oracle?

前端 未结 4 994
梦如初夏
梦如初夏 2021-02-04 23:01

I want to perform a query using sysdate like:

select up_time from exam where up_time like sysdate

which is possible in Oracle.

However,

4条回答
  •  时光取名叫无心
    2021-02-04 23:46

    You may want to use statement_timestamp(). This give the timestamp when the statement was executed. Whereas NOW() and CURRENT_TIMESTAMP give the timestamp when the transaction started.

    More details in the manual

提交回复
热议问题