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
What is meant by object-oriented data model? The object-oriented paradigm is based on encapsulation of data and code related to an object in to a one unit, whose contents are n

which component of DBMS can be embedded in a program? The data manipulation language (DML) is a component which is embedded in a program.

We face problem of stock Opening balance and closing balance in Minus

Rearrange the Execution Order for Efficiency  Rearranging execution order for efficiency means executing such job that requires less execution time. By rearranging the object

Write short notes on transaction state? A transaction may not always complete its implementation successfully such a transaction is termed aborted A transaction must be in o

Describe the storage structure of indexed sequential files and their access method.  Ans:   Storage structure of Indexed Sequential files and their access: To achieve fast rand

Increases efficiency : Data is stored close to most often used site, therefore retrieval would be faster. Also, data that is not required by local applications is not stored, there

Oracle Fusion Middleware: Key Skills: Consulting,Architect, Oracle Fusion Middleware,ECM, UCM, Stellent,Identity Management, SOA Suites, BPEL, ESB,OAM,OIM,J2ee, Java, Livelink

In E-R diagram how generalization is represented? in E-R diagram generalization is represented by Triangle shape.

Entity types that do not have any key attribute, and therefore cannot be identified independently, are known as weak entity types. A weak entity can be recognized uniquely only by