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
How to create a simple user defined function in ms sql server?
What is a dataset and what are the different types of datasets?
What is use of except clause? How it differs from not in clause?
Explain what are page splits? : SQL Server Architecture
What are different types of database indexes?
explain databases and sql server databases architecture? : Sql server database administration
What are the steps to follow to configure SQL*Net?
Can you tell me some of the common replication dmv's and their use? : sql server replication
What are the advantages of user defined function?
How do I clean up sql server transaction log?
What is report server project?
What is indexed view? How to create it?
Define master database?
How to rename an existing table with the "sp_rename" stored procedure in ms sql server?
What are the mathematical functions supported by sql server 2005?