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

What is data type in oracle?

0 Answers  


What are various joins used while writing SUBQUERIES?

2 Answers  


Explain the use of compress option in exp command.

0 Answers  


HI, Please let me know the syllabus for Oracle OCA and OCP Certification

0 Answers  


What are the different types of failures that occur in Oracle database?

0 Answers   HCL,


What are cursor?where are they used?

2 Answers  


HI ALL, CAN ANYONE TELL ME THE DIFFERENCES BETWEEN SQL CLUSTURS,MSQL CLUSTERS,ORACLE CLUSTERS.......THANKS IN ADVANCE

0 Answers  


where do i find oracle interview questions.

1 Answers  


while i take backup using ibm tsm the following errors occurred: rman-03009 ora-19513 ora-27206 ora-19502 ora-27030 ora-ora19511

0 Answers  


which sql command we can use to get a print out from oracle?

2 Answers   iFlex, INDUS,


Explain an exception?

0 Answers  


Is insert autocommit in oracle?

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)