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 / venkat
select *from emp where floor(months_between
(sysdate,hiredate))=2;
| Is This Answer Correct ? | 6 Yes | 5 No |
Post New Answer View All Answers
What are the various levels of constraints?
Explain the types of joins in sql?
What are the types of optimization?
What is Histogram?
What are secondary keys?
How can get second highest salary in sql?
What is the purpose of the primary key?
what is the difference between a having clause and a where clause? : Sql dba
Explain the insert into statements in sql?
how to convert character strings to dates? : Sql dba
How do you remove duplicates without using distinct in sql?
How to add new employee details in an employee_details table with the following details
Table 1: col1 Timestamp ---------------- 01-mar-2012 11:12:46 Table 2: col2 Timestamp -------------------- 01-mar-2012 11:12:10 01-mar-2012 11:11:23 Write a query to display a row with table2 col2 value less than tabl1 col1 value. Maximum timestamp value previous to table1 col1 value. Display a result as: Col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10
What is the file extension for sql database?
How do I delete a trigger?