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 / sonia sharma
/---- 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
inner join empTable as mgr on emp.Mno = mgr.Eno
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
can we have a nested transaction? : Sql server database administration
Why I am getting this error when dropping a database in ms sql server?
What are different types of statements that are supported by sql?
How do I install only the client tools of sql server 2000?
Characterize join and name diverse sorts of joins?
What do you understand by check constraint in sql server?
What is the tcp/ip port on which sql server runs?
What do you mean by data manipulation language?
Can you give me some DBCC command options?(Database consistency check) - DBCC CHECKDB - Ensures that tables in the db and the indexes are correctly linked.and DBCC CHECKALLOC - To check that all pages in a db are correctly allocated. DBCC SQLPERF - It gives report on current usage of transaction log in percentage. DBCC CHECKFILEGROUP - Checks all tables file group for any damage.
How can you find out if the current user is a member of the specified microsoft® windows nt® group or microsoft sql server™ role?
How do I uninstall sql server 2014?
What are the difference between “where” and “having” clause in sql server?
What do you understand by intent locks?
Where in ms sql server is ’100’ equal to ‘0’?
What is bcp? When does it use?