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.


 
Ads

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)

Advertisements

Share on Google+Share on Google+

Mysql Time Range

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

Advertisements

 

Discuss: Mysql Time Range  

Post your Comment


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

Ads

 

Ads