Self-join, Database Management System

Self-Join:  In a self join a table is joined with itself.  Let consider the following sample partial data of EMP table

EMPNO

ENAME

MGRID

.....

1

Nirmal

4

 

2

Kailash

4

 

3

Veena

1

 

4

Boss

NULL

 

.....

.....

...

 

Example: Search the name of each employee's manager name.

SELECT WORKER.ENAME || 'WORK FOR' || MANAGER.ENAME FROM EMP WORKER, EMP MANAGER

WHERE WORKER.MGR=MANAGER.EMPNO;

Output:

                                                                        2033_Self-Join.png

Posted Date: 3/11/2013 2:39:35 AM | Location : United States







Related Discussions:- Self-join, Assignment Help, Ask Question on Self-join, Get Answer, Expert's Help, Self-join Discussions

Write discussion on Self-join
Your posts are moderated
Related Questions

Set Difference If R1 and R2 are two union compatible relations or relations then result of R3 =R1- R2 is the relation that have only those tuples that are in R1 but not in R2.

It is not possible to make an ABAP/4 program, which having only Subroutines. False. We can make ABAP/4 program, which having only Subroutines.

You will be analysing a set of financial data of your choice. It is not necessary to collect any primary data of your own, and publicly available secondary data will be sufficient

Discuss how the one-to-one associations have to be implemented. Some of properties of associations can be implemented directly by providing suitable declarations of the data me

Explain the Weak Entity Set An Entity set which does not have sufficient attribute to make a primay key is known as weak entity set. For instance, dependents of an employee in

Oracle & Distributed Databases 1. Differentiate between PL/SQL functions and procedures. 2. Draw the diagram of logical structure of oracle database and explain it in brief.

Give the limitations of SQL authorization. The code for checking authorization becomes intermixed with the rest of the application code. Implementing authorization by applic

Discuss the count function? The COUNT function used returns the number of tuples or values fixed in a query. The count function comprises two types of syntax: (1) COUNT (*)

State the data flow diagram of functional model Any action initiated by transition in the state diagram can be extended into an entire data flow diagram in functional model. Th