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
How to start your 10g xe server from command line?
What is oracle analytical function?
Why cursor variables are easier to use than cursors?
Is there a function to split a string in plsql?
What are the differences between lov and list item?
How to specify default values in insert statement using oracle?
What are advantages of dateset in datastage?
How do I find my oracle client driver version?
What are the types of trigger in oracle?
What is a package in oracle?
How do you get nicely formatted results from an oracle procedure that returns a reference cursor?
What is connection pooling in oracle?
What happens if the imported table already exists?
Explain the difference between replace() and translate() functions in oracle?
What do you mean by a database transaction & what all tcl statements are available in oracle?