i have a table like this
Eno ename
1 a
2 b
3 c
i want to display ename and bossname from table
hint boss is also an employee
Answer Posted / mahesh (ezeesoft)
/---- You need one more column to view manager of each emp
suppose Mno is the column which contains corresponding Eno
as manager id--
select emp.ename , mgr.ename from empTable as emp
SELF JOIN empTable as mgr on emp.Mno = mgr.Eno
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What do you understand by intent locks?
How to name query output columns in ms sql server?
What is an indexed view?
What are the different kinds of ssrs reports?
What is best institute to Learn DotNET And SQL in chennai?
What are the pros and cons of putting a scalar function in a queries select list or in the where clause?
What is the use of keyword with encryption. Create a store procedure with encryption?
Explain the concept of view and Types of views in SQL server?
What is difference between cte and view?
What is mean by clustered index and non clustered index, give syntax of creation? : sql server database administration
Explain having clause?
Difference between Sql server reporting services and Crystal reports?
What is Fragmentation and Defragmentation? For 32GB Table,How can we do the fragmentation?
What is scheduled job and how to create it?
Does table partitioning improve performance?