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 proxy class?

0 Answers  


what are the default admin accounts in Oracle 10g ?

0 Answers   MCN Solutions,


What are the factors causing the reparsing of SQL statements in SGA?

1 Answers  


How to add a new column to an existing table with a default value?

0 Answers  


Give the sequence in which triggers fired during insert operations, when the following 3 triggers are defined at the same block level ?

1 Answers  






What is the oracle implicit cursor?

0 Answers  


How to speed up webrick?

0 Answers  


how to delete all duplicate records from a table using subquery?

7 Answers   ABC, Cap Gemini,


What is columnar storage what is the advantage?

0 Answers  


candidate key is subset of super key but not vice-verse explain

0 Answers  


i can create a view with two columns from emp table,, later i need to add one more emp column to existing view.. what is query similarly add one more column to existing primary key constraint.. please give me the solutions

4 Answers   CGI,


What privilege is needed for a user to create tables in oracle?

0 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1789)
  • 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)