Mysql Date Values

Sometimes we want to retrieve the Date Values. In this Mysql query we provide you an example demonstration with complete code description that describe you to find Date Values.


 
Ads

Mysql Date Values

     

Sometimes we want to retrieve the Date Values. In this Mysql query we provide you an example demonstration with complete code description that describe you to find Date Values.

To understand and grasp the example we have a table 'employee' that has a records or rows values specified given below. The select query is used to return the records from table employee. 

Query to select  date values :

select *  from employee;

Output :

+----+----------+------------+
| id | emp_name | emp_dob |
+----+----------+------------+
| 1 | Sourabh | 1985-11-07 |
| 2 | Vineet | 1983-11-07 |
| 3 | Girish | 1984-10-06 |
| 4 | Sourabh | 1982-01-05 |
+----+----------+------------+

Query to select emp_dob values :

Now we show the emp_dob values from the table employee. The select query return the date values from table 'employee'.

select emp_dob from employee;

Output :

+------------+
| emp_dob |
+------------+
| 1985-11-07 |
| 1983-11-07 |
| 1984-10-06 |
| 1982-01-05 |

Advertisements

Ads
Share on Google+Share on Google+

Mysql Date Values

Posted on: January 21, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Advertisements

Ads
 

Discuss: Mysql Date Values  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0

Ads

 

Ads