how to store only time in a data base table

Answer Posted / sudipta santra

No problem, There are 2 ways for doing this:

1. If the field of the table is timezone then you can set
data or insert data of timezone i.e the timezone is upto
milliseconds.

eg. insert into timetab(time_col) values(select
sysdbtimezone from dual);

2. If the field is varchar2 then you can set the value or
insert the time stamp like that:

insert into timetab(time_col)
values(substr(to_char(sysdate,'DD-MON-RRRR'),13);

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the use of online redo log files in oracle.

589


What privilege is needed for a user to insert rows to tables in another schema?

565


ABOUT IDENTITY?

1567


How to define a record variable to store a table row?

579


What is a trigger and what are its types in oracle?

537






What is query image?

586


Does facebook use oracle?

581


What are data pump export and import modes?

613


Tab A A B ------ 1 A 2 B 3 C Tab B A B ----- 4 D 5 E 6 F Generate the value into B table from A table. Only table A has the value. Write the SQL query to get B table value.

1265


Explain index?

755


What is the best way to do multi-row insert in oracle?

567


Explain view?

582


What are the attributes of cursor?

593


What is MTTR advisor in Oracle?

611


Can we save images in a database and if yes, how?

594