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 modify the underlying query of an existing view?
What is Fragmentation and Defragmentation? For 32GB Table,How can we do the fragmentation?
What is the purpose of sql profiler in sql server?
Explain identity in sql server?
What is checkpoint process in the sql server?
How to download and install microsoft sql server management studio express?
Explain indexing and what are the advantages of it?
What is the difference between drop table and truncate table?
What is blocking and how would you troubleshoot it? : sql server database administration
What is the difference between Clustered and Non-Clustered Index?
What is the beast way to write CTE in SQL Server ?
Mention what are the different types of ssrs reports?
What is read uncmmited?
How to backup SQL Server Reporting Services ?
How to execute the cursor queries with "open" statements?