appropriate Sql queries

Posted by Rajendra.prasad under Sql Server on 3/22/2010 | Views : 1252 | Status : [Member] | Replies : 2
Hi All,
table for EMP wid Cols: emp_id, emp_name dept_id, emp_sal and DEPT wid cols:dept_id, dept_name

1) query for output cols: (emp_id,dept_name,emp_sal) for each employee?

2) query for second highest salary in EMP in each department?

3) query to assign ranks for employee with each department, based on salary?

4) two different queries with same result to retrieve department which have more than one employee?

5) create a table with cols: first_name, middle_name, last_name,age where first_name, last_name and age must be primary keys?

plz reply wid appropriate queries in both SQL n Oracle.

thnx a ton in advance.

Regards
Rajendra




Responses

Posted by: Vuyiswamb on: 3/24/2010 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
What have you tried yet ?

Thank you for posting at Dotnetfunda
[Administrator]

Rajendra.prasad, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Man2vb on: 5/14/2010 [Member] Starter

Up
0
Down
this is the basic question have u tried anything in SQL:)

Rajendra.prasad, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response