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
A set of possible data values is called? A set of possible data values is called as domain.


How can you connect to the MySQL Server? In order to connect to the MySQL server it is necessary to give the username and password so this be able to done with The following

Convert the following ER - diagram (Entity Relationship Diagram) into a relational database (the primary keys are underlined):       Ans:  The relational database schema f

Determine object representation As a designer, we must choose properly that when to use primitive types in representing objects and when to combine groups of related objects,

Define Sequence A sequence is a set of integers 1, 2, 3 that are generated in order on demand. Sequences are regularly used in databases because lots of applications require ev

A database to track your progress in your college program will track your progress towards graduation! A database that has information containing the classes that you have taken, c

Given the following set of functional dependencies {cf→ bg, g → d, cdg → f, b → de, d → c} defined on R(b,c,d,e,f,g) a. Is cf→ e implied by the FDs? b. Is dg a superkey?

Define weak and strong entity sets? Weak entity set: entity set that do not have key attribute of their own are known as weak entity sets. Strong entity set: Entity set that

Describe the tools that are available for managing MySQL Server. Given below are the tools to manage MySQL server: mysqld - MySQL server daemon. This is used to begain t