I want to display the employees who have joined in last two
months. (It should be executed randomly means If I execute
the query in March it should display Jan and Feb joined
employees. Same query if i execute in Feb, 2007 it should
display dec, 2006 and jan 2007 joined employees.
Answer Posted / pracheth
select * from temployees where to_char(hiredate,
'month') in
(to_char(trunc(sysdate,'month')-30,'month'),to_char(trunc(sysdate,'month')-60,'month'))
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Explain commit, rollback and savepoint.
what is a primary key? : Sql dba
What is sqlite used for?
Can I learn sql in a week?
What is pivot in sql?
What is the difference between partition and index?
Explian rowid, rownum? What are the psoducolumns we have?
Why is a trigger used?
How do I kill a query in postgresql?
Can you have a foreign key without a primary key?
Why we use join in sql?
How do I view tables in mysql?
What is cursor in pl sql?
How to fetch alternate records from a table?
What is left join in postgresql?