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 is a benefit of using an after insert trigger over using a before insert trigger?
what are the core components of SSRS?
What causes index fragmentation?
Differentiate sql server reporting services vs. Crystal reports?
How does recursive cte works in sql server?
List some major differences between triggers and stored procedures?
What do you understand by user-defined function in the sql server?
What is importing utility?
Write a SQL query to delete a table?
How to return the top 5 rows from a select query in ms sql server?
How can we check the sql server version?
What are examples of triggers?
New concepts of sql server 2005 use in your project.
What is the openxml statement in sql server?
Explain what is lock escalation and what is its purpose?