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
Answers were Sorted based on User's Feedback
Answer / 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 |
/---- 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 |
What is the use of sql profiler in sql server 2012?
What is the difference between local and global temporary tables?
What is pessimistic concurrency?
Do you know what are the differences between lost updates and uncommitted dependencies?
How can you find out if the current user is a member of the specified microsoft® windows nt® group or microsoft sql server™ role?
What is a trigger in sql server?
What is the difference between Clustered and Non-Clustered Index?
Psudo colums
What is the difference between locking and multi-versioning?
What is user stored procedure & it purpose?
From where can you change the default port?
What are the risks of storing a hibernate-managed object in a cache? How do you overcome the problems?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)