Mysql Year of Date

Ads
 

Mysql Year of Date

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

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)

Ads

Tutorials   

Ads