Home Sql Sqldate Mysql Time Field
Questions:Ask|Latest


 
 

Share on Google+Share on Google+

Mysql Time Field

Advertisement
Mysql TimeField Query is performed when you want to return the time field from the table.

Mysql Time Field

     

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;

Output :

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

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

Ask Questions?    Discuss: Mysql Time Field  

Post your Comment


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