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 / satish

select * from emp where
round(months_between(sysdate,hire_date) in(1,2);

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to Declare Fixed Length String Value In PL SQL

754


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

3408


List the different type of joins?

671


How we can update the view?

686


Is it possible to link two groups inside a cross products after the cross products group has been created?

685






what are string data types? : Sql dba

601


Is crud a cuss word?

680


how to rename an existing table in mysql? : Sql dba

655


How do I truncate a word?

612


Can you select everything, but 1 or 2 fields, without writer's cramp?

589


How do I view a table in sql?

624


what is sql in mysql? : Sql dba

677


How can we solve sql error: ora-00904: invalid identifier?

777


Can %notfound return null after a fetch?

677


What are tables and fields in the database?

638