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 / sdp
select * from emp
where trunc(months_between(sysdate, hiredate))=2;
| Is This Answer Correct ? | 39 Yes | 14 No |
Post New Answer View All Answers
What is a boolean in sql?
In what condition is it good to disable a trigger?
What is assignment operator in pl sql?
table structure: ---------------- col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10 01-mar-2012 11:12:46 01-mar-2012 11:11:23 Write a query to display the result as shown below: col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10
Can sql developer connect to db2?
What is replication id?
What is the need of a partition key?
How does postgresql compare to "nosql"?
Why cannot I use bind variables in ddl/scl statements in dynamic sql?
how to enter numeric values as hex numbers? : Sql dba
What is int identity in sql?
What is acid property in a database?
What is exit statement?
Is vs as in pl sql?
Does pl/sql support create command?