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

Give the various exception types.

551


How to list all user accounts in oracle?

616


What are the different oracle database objects?

588


What is the data pump import utility?

585


normally database take to refresh time 2 hours. but client asked iwant to refresh with in 5 min that same database. do you have any option in BO and Oracle? explain me briefly...kavi

1744






What are operators in oracle?

532


what is IDE,DMV in sql server?

2252


What is transport network substrate (tns) in oracle?

592


Point the difference between translate and replace?

577


What is a tns file?

502


What view(s) do you use to associate a users SQLPLUS session with his o/s process?

1911


What is object data modeling?

507


How many types of table in Oracle?

619


What happens if recursive calls get out of control?

551


How to write date and time literals in oracle?

557