Mysql TimeField Query is performed when you want to return the time field from the table.
Understand with Example
The Tutorial illustrate an example from 'Mysql Time Field'. To grasp the example we create a table 'timetable' with fieldnames and datatypes specified in the below query. The table 'timetable' has Primary Key 'id'.
This Example create mysql Time field and display it
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 :
The Query specifies time_field records from timeTable.
|select time_field from timeTable;|
| time_field |
| 10:10:10 |
1 row in set (0.00 sec)
Rs. 20,000 US$ 300
Today: Rs. 10,000 US$150
Course Duration: 30 hrs
Posted on: January 21, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles