Is it possible to enter only time value into a column of a
table in sql?

Answers were Sorted based on User's Feedback



Is it possible to enter only time value into a column of a table in sql?..

Answer / zaheer

No,
you can store as (HH24:MI) at form level, also make format
DateTime.
Query by - to_date(HH24:MI)
Also you can use Timestamp - I tied it in Oracle 10g. It
will store date and time

Is This Answer Correct ?    0 Yes 0 No

Is it possible to enter only time value into a column of a table in sql?..

Answer / nannesaheb c

There is no such data type is existed in Oracle to store the time in a column directly.

However we can insert the time value in a column using the sql functions as below.

SELECT substr(to_char(sysdate,'DD-MON-YYYY HH:MM:SS'),12,20) FROM dual;

create table time1
(
today_time varchar2(10)
);
insert into time1 values(substr(to_char(sysdate,'DD-MON-YYYY HH:MM:SS'),12,20));

Regards,
Nanne

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Oracle General Interview Questions

Can you use a commit statement within a database trigger?

4 Answers  


I creat Credit memo in AR. Now i want revers the Credit Memo.how you can revers that what out any aditional entry.

0 Answers   GTL,


I have query like this. select dept_id, max_mark from stude_dept where min_mark= (select min(mini_mark) from stud_dept); How can i optimize this query. Can anyone help me with it

2 Answers  


Can we create trigger on materialized view in oracle?

0 Answers  


what is normalisation?what are its uses?

0 Answers  






which clause we are not used in where clause?

3 Answers   Semantic Space,


What is self-referential integrity constraint ?

2 Answers   SunGard,


How to export your connection information to a file?

0 Answers  


Where do you use decode and case statements?

0 Answers  


What is the difference between Sleep and Wait? (Java)

1 Answers   RBS,


The table has 3 columns 4 rows. The output is which column has least null values( A COL SHOULD BE THE OUTPUT) Write the query plz. A B C ================ 1 NULL 2 NULL 3 4 NULL 5 6 7 NULL NULL O/P C = 2 4 6

2 Answers   TCS,


I have table-A(1,2,3,4,4,5,6,6,6,7). how to get all duplicate values?what is sql query?

5 Answers   Zensar,


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)