Home Sql Mysql-alter Mysql Time Range

Related Tutorials


 
 

Share on Google+Share on Google+

Mysql Time Range

Advertisement
Mysql Time Range is used to displays time values in 'HH:MM:SS' format, but helps you to assign values to Time columns using either strings numbers.

Mysql Time Range

     

Mysql Time Range  is used to displays time values in 'HH:MM:SS' format, but helps you to assign values to Time columns using either strings numbers.

Understand with Example

The Tutorial illustrate an example from 'Mysql Time Range'. To understand example we create a table 'timetable' with fields and datatypes respectively .The table has a Primary Key id.

Create 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 :

To select and return the time _field records we run select query.

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 16, 2009

Related Tutorials

Discuss: Mysql Time Range  

Post your Comment


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