What is a self join? Explain it with an example?

Answer Posted / madhavi

Joining the table to itself is self join.
Example:

To find the manager name for each employee in the employee
table:
select e1.empno employee_id,e1.ename employee_name,e2.ename
manager_name,e2.empno employee_num from emp e1,emp e2 where
e1.empno=e2.mgr;

Is This Answer Correct ?    27 Yes 17 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When installing the datastage7.5x2 edtion iam getting aproblem i.e the cpu count is 2 but the cpu count in installation is one . how can i install in my p.c (system is dual core).

1776


How to combine two function together?

1650


What you can do to remove data from the cache and query plans from memory for testing the performance of a query repeatedly?

579


Explain about normal forms?

590


What are the constraints on severity level in raiseerror?

573






I HAVE A PI ON COL A THE NEXT DAY I WANT CHANGE THE PI ON COL B? PLS SEND ME THE ANS

2406


How to replace not in with not exist?

1452


What is normalization? Explain different levels of normalization?

59763


What is DB Development software?

1603


What is an application role and explain a scenario when you would use one?

544


What is the database development process?

675


What is data modeling with example?

523


I have a few records all are same structures data, I want to store data in multiple targets how

2133


Which data type cannot be used as a parameter in a udf?

562


Write short notes on manual refreshes.

2277