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 user-defined multi-statement table-valued function?
how many clustered indexes can be created on a table? : Sql server database administration
What are the underflow and overflow behaviors on float literals?
What are different types of table joins?
How exceptions can be handled in sql server programming?
if no size is defined while creating the database, what size will the database have? : Sql server administration
Can We Use Data-grids For Our Report In Ssrs?
How to enter binary string literals in ms sql server?
What are different backups available in sql server?
Give an example of why you would want to denormalize a database
What is a fill factor?
What is difference between getdate and sysdatetime in sql server 2008?
How to count duplicated values in a column in ms sql server?
Is oracle faster than sql server?
What is replace and stuff function in sql server?