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
Speedup Query Processing: A query that includes data at various sites can be split into sub-queries. These sub- queries can be implemented in parallel by various sites. Such parall

a project based on normalization with first, second and third normalization. There need to be a diagram also

List the Armstrong's axioms for functional dependencies.  What do you understand by soundness and completeness of these axioms?      Ans: The Armstrong's axioms are: F1:

For the relations answer the following queries in SQL Street (name, location, city) House (number, street_name) Lives (name, house_number) (i) Obtain the names of persons who liv

Group By clauses  • It is used to group database tuples on the basis of definite common attribute value like as employees of a department. WHERE clause still can be used

Advantages of Data Distribution The primary benefit of distributed database systems is the ability to access and share data in a reliable and efficient manner.

what is correlation in nested query

Now that she understands more about the benefits of databases, the play-scheme manager would like to extend the play-scheme database to include data for schools and instructors as

Explain ODBC? ODBC - Open DataBase Connectivity (ODBC) enable the integration of SQL along with a general-reasons programming language.

Attributes that are directly kept in the data base. For example, 'Birth date' attribute of a person.   Derived  Attributes that are not stored directly but can be derived