Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • SQL SELECT DATE

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 199
    Comment on it

    SQL SELECT DATE

    if you want to retrieve a date from database,use this staement. For eg. you want to find a particular date from a database, this statement is the answer.

    1)For example: let's see the query to get all the records after '2013-12-12'.
    SELECT * FROM
    table-name WHERE your date-column >= '2013-12-12'

    2) another query to retrieve all the records after '2013-12-12' and before '2013-12-13' date.
    SELECT* FROM
    table-name where your date-column < '2013-12-13' and your date-column >= '2013-12-12'

    3)If you want to compare the dates , use of BETWEEN operator is the answer.
    SELECT * FROM
    table_name WHERE yourdate BETWEEN ?2012-12-12? and ?2013-12-12?

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: