Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Count total by current year of Current month in mysql

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 292
    Comment on it

    To count total by current year and current month you need to execute the following MySQL statement:

    Select * from tablename where year(columnname)=year(now()) and month(columnname)=month(now())
    

    Example: Suppose we have a database product having table sale. We have to find out the sale of current month and year. To perform this you need to execute the following MySQL statement:

    Select * from product where year(saledate)=year(now()) and month(saledate)=month(now());
    

 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: