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
1. Explain different addressing modes of 8086 Explanation of all addressing modes 2. Write a sequence of instructions to exchange two register contents using stack


File Organisation In Dbms Introduction Databases are used to store information. Usually, the principal operations we have to perform on database are those relating to:

(a) Explain the three types of potential mistake which could occur if concurrency control is not properly enforced in the database system. Support your answer with appropriate ex

Project Description: I am updating my Javascript + HTML website with five domains for the same website I would like to know if I want to create site map and submit it in all the

What is the meaning of Recovery? In deferred update methods, if a transaction fails before arriving its commit point, it will not have altered the database in any way, so UNDO

Designing the fields in the data base The following are the considerations one has to remain in mind while designing the fields in the data base. Coding, compression, en

What are three components of the schema architecture proposed by ANSI/SPARC? The three component schema architecture proposed by ANSI/SPARC is as given below: External sche


what is inverted and multilist structure