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
Explain the disadvantages of creating a temporary table? If you have already created a temporary table with a shown name and attempting to create a second one with that nam

What are the states of transaction? The states of transaction are:- a) Active b) Partially committed c) Failed d) Aborted e )Committed   f) Terminated

Conversion of entity sets: I)   For  every  strong  entity  type  E  in  the  ER  diagram,  we  make  a  relation  R containing all the easy attributes of E. The relation R pri

What are the uses of ODBC? Under what circumstances we use this technology? ODBC expose database capabilities within a standardized way to the application programmer by an ap

There are three main sources of utilities and applications for a DBMS: a. Vendor applications and utilities are given for working with or maintaining the database, and generally

Define Aggregate functions and what aggregate functions supported by the MySQL To calculate a summary value from a set of individual values and uses one of the functions known

Question 1 Explain the concept of database recovery management. Explain the different levels of backup used for recovering data Question 2 What are the different types of par

Have database built but having problems with some questions that go with the database


A video rental company has several branches. The data held on each branch is the branch address made up of street, city, state, and zip code, and the telephone number. Ea