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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How to write date and time literals in oracle?

740


What is the difference between alert log file and tarce file ?

1855


How do I call oracle stored procedures that take no parameters?

790


Give the advantages and disadvantages of clusters.

784


How to create a new view in oracle?

835


What exactly do quotation marks around the table name do?

724


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

2207


What is using clause and give example?

809


Can a formula column referred to columns in higher group ?

2262


What is columnar storage what is the advantage?

737


How to import one table back from a dump file?

798


Why use resource manager in Oracle?

867


How to insert a new row into a table in oracle?

822


How to create a table in a specific tablespace?

739


Why do we need oracle client?

689