Self-join, Database Management System

Assignment Help:

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


Related Discussions:- Self-join

Find the employee name, Example -Find the employee name, salary, department...

Example -Find the employee name, salary, department number and average salary of his/her department, for those employees whose salary is more than the average salary of that depart

#title using the invoice, using the invoice table shown below,write the rel...

using the invoice table shown below,write the relational schema,draw a dependencies,inclunding all partial and transitive dependencies.assume that the table does not contain repeat

2phase locking, we need example of 2phase locking

we need example of 2phase locking

Explain the management of data store, Explain the Management of Data Store ...

Explain the Management of Data Store Every system irrespective of its nature of application requires storing permanent data for consequent use in problem solving. Some objects

Cartesian product, If R1 and R2 are two relations or functions, then the re...

If R1 and R2 are two relations or functions, then the result of R3 = R1 × R2 is the combination of tuples that are in R1 and R2. The product is associative and commutative. Degr

Consistency, what do you mean by consistency in rdbms?

what do you mean by consistency in rdbms?

Create a database for store company details, You group has been hired by  T...

You group has been hired by  TrainingrUs.com to keeps track of training revenues. TrainingrUS.com wants you to keep scheduling. COURSE table contains following information:

Design a large scale system, Question: (a) Why is it important to know...

Question: (a) Why is it important to know the architecture rather than to start requirement capture when designing a large scale system? (b) Who are the different people in

Draw an er diagram for organization of a student database, Draw an ER diagr...

Draw an ER diagram that shows the organization of a simple student database. The database captures the information about letter grades obtained by university students who enrolled

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd