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
By using the delete operation some consisting records can be deleted from a relation. To delete some definite records from the database a condition is also specified based on which

Define deadlock prevention. Deadlock prevention is a set of methods for ensuring that at least one of the four essential conditions like mutual exclusion, hold and wait, no pre


(a) Why did SAP introduce the extended star schema?

What are the advantages of relational data model? Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer

What are the types of reference?explain it with suitable examples? Object oriented language given the ability to refer the object attribute of the type can be referred to the s

1.  Based on the dependency diagram, create a database whose tables are in at least 2NF, showing the dependency diagram for each table (as shown in class).  Label the types of depe

Assume you are given a uniprocessor system with one gigabyte of memory and a 300 gigabyte disk. The OS on the machine has a demand paged virtual memory system with a local page rep


What is the use of keyword ISA? The use of keyword ISA is to show that a class is a specialization of another class.