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 are the different types of cursors? explain?

4 Answers  


how to find the second highest salary in a given table????

5 Answers  


select to_char('10','10') from dual This gives me an error oRA-1481 INVALID NUMBER FORMAT MODEL why? pls help

6 Answers  


What is the database name in oracle?

0 Answers  


What is snapshot is too old? Give and example for better understand.

0 Answers   TCS,






query to find the maximum no persons with same age(age colomn) from emp table

1 Answers  


What is a trace file and how is it created in oracle?

0 Answers  


select statement does not retrieve any records. what exception is raised?

2 Answers  


what is load balancing and what u have used to do this?(sql loader)

3 Answers  


Explain oracle’s system global area (sga).

0 Answers  


why can't we assign not null constraint as table level constraint

3 Answers   CTS, Wipro,


What are the predefined tablespaces in a database?

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)