I also did not know about limit and offset. Bookmarking this page for future reference!
Another alternative method, based somewhat on jtalor's SQL - you can use row_number() to add row numbering to the subselect, enabling you to choose the nth row
Another alternative method, based somewhat on jtalor's SQL - you can use row_number() to add row numbering to the subselect, enabling you to choose the nth row
Code:
with TwoDays as ( select DATE, row_number() over(order by DATE) as ROWNUM from TABLE where DATE > current_date and WEEKEND = 'N' and HOLIDAY = 'N' ) select DATE from TwoDays where ROWNUM = 2;
Comment