Home Sql Sqldate Mysql Year of Date
Questions:Ask|Latest


 
 

Share on Google+Share on Google+

Mysql Year of Date

Advertisement
Mysql Year of Date is used to return the current year of the table in database.

Mysql Year of Date

     

Mysql Year of Date is used to return the current year of the table in database.

Understand with Example

The Tutorial illustrate an example from 'Mysql Year of Date'. To understand and grasp the example we use the following query (current_date) that return the current year of  the table.

Current_Date: The Query is used to return the current year of the date in a  table as fieldname YEAR(CURRENT_DATE).

In this example to show the year of a date.

Query to show the year of a Current Date

mysql> SELECT YEAR(CURRENT_DATE);
+--------------------+
| YEAR(CURRENT_DATE) |
+--------------------+
| 2009 |
+--------------------+
1 row in set (0.00 sec)
Advertisements

Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: January 20, 2009

Ask Questions?    Discuss: Mysql Year of Date   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
DMCA.com