Re: inserting time values to table

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Mon, 28 Nov 2005 19:26:11 +0100
Message-ID: <438b4bc3$0$28137$626a14ce_at_news.free.fr>


"preeti" <shwethanrao_at_gmail.com> a écrit dans le message de news: 1133201706.985636.154990_at_z14g2000cwz.googlegroups.com...
|I have a basic problem here. It looks very silly but some body help
| me...
|
| I have created a table in oracle 10g using following query
| create table time_slots
| (
| ts_id number(3)not null,
| day char(5),
| start_time date,
| end_time date,
| constraint time_slot_pk primary key(ts_id)
| );
|
| I want to insert 8:00 AM and 9:20 AM to start_time and end_time
| fileds. How can I insert and retrieve these values to and from the
| table? Is there an easy way to store and retrieve time values?
|
| I tried to create these fields in the table using datetime data type,
| but it gave me an error.
|
| Thank you
|

Have a look at SQL Reference manual, to_char and to_date functions: http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/functions180.htm#sthref1969 http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/functions183.htm#sthref1981

Regards
Michel Cadot Received on Mon Nov 28 2005 - 19:26:11 CET

Original text of this message