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) |
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: Mysql Time Range
Post your Comment