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 / kesava
100% sure execute
select * from emp
where hiredate between
trunc(add_months(last_day(sysdate),-3)+1) and
trunc(add_months(last_day(sysdate),-1))
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Can we delete column in sql?
what are date and time functions in mysql? : Sql dba
Where do we use pl sql?
What is varray in pl sql?
What is sql keyword?
How do I count rows in sql query?
Is sql injection illegal?
list out some tools through which we can draw e-r diagrams for mysql. : Sql dba
What normalization means?
How do I add a primary key to a table?
write an sql query to find names of employee start with 'a'? : Sql dba
What is difference between sql and excel?
What is mutating error?
Does a join table need a primary key?
What is the difference between local and global temporary table?