How to find 10 sequencing date for today in SQL query

Tags:
SQL
SQL Query
It's like date 1 2 3 4 5 6 7 8 9 10 with month and year. How can I do this using a SQL query?


Software/Hardware used:
NA
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • carlosdl
    It might depend on the database you are using.

    In Oracle, you can use the CONNECT BY clause to generate rows this way:

    SELECT sysdate + level
    FROM dual
    CONNECT BY level <= 10;


    Which produce these results:

    24-MAR-16
    25-MAR-16
    26-MAR-16
    27-MAR-16
    28-MAR-16
    29-MAR-16
    30-MAR-16
    31-MAR-16
    01-APR-16
    02-APR-16

    If you want more accurate answers, please explain your requirement further, since it is not completely clear, and tell us the database system you are using (including the version number).
    84,745 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: