Thursday, 12 September 2013

Display of highest value of data using two tables

Display of highest value of data using two tables

i have two tables employee and department with the following data
emplyee table
empid Ename deptid
1 Ajay 1
2 Vijay 1
3 sanjay 2
4 rajiv 1
5 rohit 2
6 sohit 3
department table
deptid deptname
1 HR
2 IT
3 A/C
my question is to how to display the dept name which has highest(2nd
highest or nth highest) employees in it. Please help i m beginner in SQl.

No comments:

Post a Comment