Welcome to MSSQL Forum!
MSSQL Forum - Discussions about Microsoft SQL Server

You are currently viewing our community forums as a guest user. Sign up or
Having an account grants you additional privileges, such as creating and participating in discussions.

mysql query to retreive all the records from march 2013 to may 2013

Discussion in 'General' started by giridhar276, Jun 23, 2013.

  1. giridhar276

    giridhar276 New Member

    Hi experts,

    I am struggling for a query to retreive data from the mysql database.

    I have a table with the below records. I am looking for a query that displays ALL THE RECORDS from march 2013 to may 2013.

    Code (text):

    p_month    p_year

    march        2013
    march        2013
    april          2013
    may          2013
    june          2013
    february     2012
    may          2013
    march        2013
    april 2        2013
    augest       2012
     

    If I write an mysql query to print all the records from march 2013 to june 2013 then output should be

    Code (text):

    march    2013
    march    2013
    march    2013
    april       2013
    april       2013
    april       2013
    may       2013
     
    If I write an mysql query to print all the records from april 2013 to june 2013 then output should be

    Code (text):

    april       2013
    april       2013
    april       2013
    may       2013
     

Share This Page