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
what is union, minus and interact commands? : Sql dba
Explain select statements in sql?
What are the uses of merge?
which command using query analyzer will give you the version of sql server and operating system? : Sql dba
How do I run a script in sql developer?
How do I find duplicates in a single column in sql?
Which is faster joins or subqueries?
What is sql select statement?
how can we destroy the session, how can we unset the variable of a session? : Sql dba
What are % type and % rowtype?
Is it possible to read/write files to-and-from PL/SQL?
How many joins can you have in sql?
What is assignment operator in pl sql?
What is the use of partition by in sql?
Does varchar need length?