'SQL Add One Day To Query Date

I would like to add one day to query date, then get all the data greater than today.

Fields: valid_to

Table: Post

Select * from posts where valid_to + 1 > Now()


Solution 1:[1]

The Postgres SQL you want here is:

SELECT * FROM posts WHERE valid_to + interval '1' day > NOW();

As for the logic, it is not clear this is the query you need without seeing some sample data.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Tim Biegeleisen