Is it possible to enter only time value into a column of a
table in sql?
Answers were Sorted based on User's Feedback
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 |
How do we create privileges in oracle?
how to truncate date and get only time part 9:20:00
can u call user defined functions in select statements
How to drop an existing view in oracle?
How does propagation differ between Advanced Replication and Snapshot Replication (read-only)?
I'm doing my final year and i ve planned to do an oracle certification , is this the rit tim nd wat's the future scope??
WHAT IS THE DIFFERENCE BETWEEN PRIMARY KEY(PK) CONSTRAINT AND UNIQUE KEY(UK) + NOT NULL(NN) CONSTRAINT ASSIGN TO A COLUMN ? INSTEAD OF ASSIGNING PK ,WE CAN ASSIGN UK + NN TO A COLUMN. WHAT ARE THE MARRITS AND DEMARITS BETWEEN THE ABOVE TWO?THE ABOVE TWO ARE SAME,THEY DON'T ALLOW DUPLICATE AS WELL AS NULL VALUES.
Explain the use of show option in imp command.
What is tns entry?
what's query optimization and without use of IN AND Exist can we get another way data from query
Write a simple Store procedure and pass parameter to it ?
How to define a variable of a specific record type?