In PostgreSQL:
Let say:
SELECT DATE(NOW())+interval '1 day';
It will show date tomorrow.
Problem:
While I having a column duration
in table tbl
, following SQL does not work :
SELECT DATE(NOW())+interval duration || ' day' from tbl;
I just wondering how to make the '1 day' become a variable instead of a constant.