What is a self join ?

Answer Posted / rupesh.dbms@gmail.com

It is the join in which result is obtained by equating two
coloumns with same values of one table for example
emp(eno,ename,mgrno) eno is primary key and mgrno is
recursive foreign key

select e.eno,e.ename,m.mgrno,m.ename mgrname
from emp e, emp m
where m.eno=e.mgrno;
note : one table emp is replicated as m , e and then
result is obtained.

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of non clustered index?

714


How do I run sql?

828


What is %s in sql?

753


what are the different type of normalization? : Sql dba

765


What is flag in sql?

741






Why trigger is used in sql?

695


What does t sql mean?

704


Define a temp table?

755


What is scalar function?

775


How to raise user-defined exception with custom sqlerrm ?

863


What is data types in sql?

705


What is delimiter in pl sql?

743


Explain what is an index?

759


What is transaction control language (tcl)?

849


What is an example of translating a date into julian format?

777