Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Sql Sqldate Mysql Time Type

Related Tutorials


 
 

Share on Google+Share on Google+

Mysql Time Type

Advertisement
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".

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)
Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



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

Related Tutorials

Discuss: Mysql Time Type  

Post your Comment


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