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
Is sql pronounced sequel or sql?
Can a composite key be null?
What is meaning of <> in sql?
What is where clause in sql?
Is sql database free?
Is it important to partition hard disk?
What are different types of functions in sql?
Is coalesce faster than isnull?
What is t sql in sql server?
Is primary key clustered index?
what are all different types of collation sensitivity? : Sql dba
What is basic structure of pl sql?
Is not null in sql?
i have 2 table table one 4 columns respective values a1 7,a2 6,a3 8 ,a4 12 & table two 4 colums respective values a1 7,a2 6,a3 8,a4 15.if table one & table two 3 colums same then 4th column values 1)Qes diff >5 then print 5 * diff value 2)Que diff <5 print 5
What are the conditions an underlying table must satisfy before a cursor can be used by a positioned update or delete statement? : Transact sql