how to store only time in a data base table

Answers were Sorted based on User's Feedback



how to store only time in a data base table..

Answer / 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

how to store only time in a data base table..

Answer / ns

select to_char(systimestamp,'HH24:MM:SS') from dual;

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Oracle General Interview Questions

What is a Synonym ?

3 Answers  


How to use like conditions in oracle?

0 Answers  


what is the exact definition for pointer?

7 Answers   Wipro,


25. Display the client number and the value of the highest value order placed by that client.

2 Answers   Wipro,


what is difference between foreign key and reference key

3 Answers   AZTEC, Infosys,


what is the difference between primary key & foreign key?

57 Answers   CTS, Infosys, La Multi, Sparsh, Wipro,


How to define a procedure inside another procedure?

0 Answers  


How do we get field details of a table?

0 Answers  


Can sub procedure/function be called recursively?

0 Answers  


What is SQL access advisor in Oracle?

0 Answers   MCN Solutions,


How to use attributes of the implicit cursor in oracle?

0 Answers  


How to login to the server without an instance?

0 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1808)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)