Options

interval or TIMESTAMPADD()

Looking to query vertica for records where a timestamp column's value is more than 6 hours older than the current time.  Is there any significant advantage of one of these over the other:

 


 <= (TIMESTAMPADD(HOUR,-6,CURRENT_TIMESTAMP))::timestamptz

 

 <= (current_timestamp - interval '6 hours')

 

 

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file