Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Date SQL in oracle..?

I'm new to SQL. How what is the structure/syntax for an sql statement to find out all titles in table x where a date in a date field is between today and the next 30 days...

2 Answers

Relevance
  • 1 decade ago
    Favorite Answer

    Assuming you want to start from midnight (trunc sysdate):

    select title

    from x

    where date_field between trunc(sysdate) and trunc(sysdate + 30);

    Hope it helps.

  • 1 decade ago

    select

    TITLE

    from

    X

    where

    X_DATE between today and today+30;

Still have questions? Get your answers by asking now.