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

Describe the types of sub query?

0 Answers  


What are the differences between char and nchar in oracle?

0 Answers  


how to get count of tables in particular database in Oracle?

3 Answers  


Query to get max and second max in oracle in one query ?

34 Answers   CTS, Keane India Ltd, TCS, Wipro,


Define the SGA and: How you would configure SGA for a mid-sized OLTP environment? What is involved in tuning the SGA?

0 Answers  


i must get table name, constraint type, constrain name with using concads "||" and it must be in string type, then with join processes i need code please help immidiately

1 Answers  


How to invoke the original export import utilities?

0 Answers  


What is an anonymous block?

0 Answers  


how to do daily transactions with out sql* loader control file regesterd in apps?

0 Answers   Arrow Electronics,


What happens to the indexes if a table is recovered?

0 Answers  


How to turn on or off recycle bin for the session?

0 Answers  


How to select some rows from a table 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)