Mysql Time Type

This Example create mysql retrieves and displays TIME values in 'HH:MM:SS' format but HHMMSS format it makes sense as a time for example "101112".


 
Ads

Mysql Time Type

     

This Example create  mysql retrieves and displays TIME values in 'HH:MM:SS' format but HHMMSS format it makes sense as a time for example "101112".

 

 

 

 

 

 

Database Table "timeTable":

CREATE TABLE `timetable` ( 
`id` bigint(20) NOT NULL auto_increment, 
`time_field` time default NULL, 
PRIMARY KEY (`id`) 
)

Query to select  time values :

select time_field from timeTable;

Output :

+------------+
| time_field |
+------------+
| 10:10:10 |
+------------+
1 row in set (0.00 sec)

Advertisements

Share on Google+Share on Google+

Mysql Time Type

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

Advertisements

 

Discuss: Mysql Time Type  

Post your Comment


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

Ads

 

Ads