how to store only time in a data base table
Answers were Sorted based on User's Feedback
Answer / sudipta santra
No problem, There are 2 ways for doing this:
1. If the field of the table is timezone then you can set
data or insert data of timezone i.e the timezone is upto
milliseconds.
eg. insert into timetab(time_col) values(select
sysdbtimezone from dual);
2. If the field is varchar2 then you can set the value or
insert the time stamp like that:
insert into timetab(time_col)
values(substr(to_char(sysdate,'DD-MON-RRRR'),13);
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / ns
select to_char(systimestamp,'HH24:MM:SS') from dual;
| Is This Answer Correct ? | 1 Yes | 0 No |
how to get count of tables in particular database in Oracle?
what is insert all statement in sql
In Exception handling if we are using the when others first then what happens . whether it will show the compiler error
Describe the types of sub query?
How a database is related to tablespaces?
How to delete a column in an existing table in oracle?
3. Adapt your query in (2) above so that only post codes with more than twenty orders are displayed.
interview questions with answer for cts
How to convert the date format from dd/mm/yyyy to mm/dd/yyyy. (for eg). 22/05/2008 to 05/22/2008. when u use to_char(), it tells the month is invalid. how to resolve this problem.tel with eg.
What is the difference between formal parameters and actual parameters?
Given two table employee and department EMP ---------------- empid deptid(fk) Dept --------------------- deptid(pk) deptname que-Write a query to find count of employee in each department. Expected Output- deptid countofEmployee --------------------------- 10 57 20 20 30 15
20. Using a set operator, display the client number of all clients who have never placed an order.