What is a self join ?

Answers were Sorted based on User's Feedback



What is a self join ?..

Answer / anil_abbireddy

A table is joined itself is called self join or Self
referential integrity.

Is This Answer Correct ?    12 Yes 0 No

What is a self join ?..

Answer / 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

What is a self join ?..

Answer / anbu

Self join is defined as a table is viewd by two different
ways and then the join can be done with the same table.
By another way the definition is 'A table can be joined
with itself using sel join'.

Is This Answer Correct ?    7 Yes 1 No

What is a self join ?..

Answer / ram

Normally we joins for retrieve data from more than 1 table

In some cases we need to join 1 table itself to join itself
condition is table having two column with same data type &
size but name are different
In emp table empno & mgrno are two columns example for this


select ename,job,sal,e.empno,m.mgrno from emp e inner join
emp m on m.mgrno=e.empno

Is This Answer Correct ?    2 Yes 2 No

What is a self join ?..

Answer / praker

join two members

Is This Answer Correct ?    4 Yes 6 No

What is a self join ?..

Answer / vipin kumar

we are joining more than 2 tables

Is This Answer Correct ?    3 Yes 12 No

Post New Answer

More SQL PLSQL Interview Questions

What is pl/sql tables?

7 Answers   TCS,


What is sqlite format?

0 Answers  


can i create trigger on synonym is it possible or not please help me

4 Answers   CGI,


In table a 1lakh data is present,in table b 20 thousand data is present, to get unique data from table a and b which join to be considered. whether right outer join or left inner join. 

2 Answers   GE,


Explain the usage of WHERE CURRENT OF clause in cursors ?

3 Answers  






what is rollback? : Sql dba

0 Answers  


What are the types of SQL Statement?

3 Answers  


How do I view a view in sql?

0 Answers  


i have a table like this. i want to output like this c1 c2 c1 c2 1 10 1 10 2 20 2 30 3 30 3 60 4 40 4 100 5 5 5 105 c1 and c2 are columns in a table .i want output like this c2 values are 10,10+20,10+20+30,10+20+30+40.10+20+30+40+5. write a sql query.pls help this i want urgent.

2 Answers   IBM, Loginworks, OFSS,


Do prepared statements prevent sql injection?

0 Answers  


What is dynamic sql in pl sql?

0 Answers  


How to load data with sql*loader?

0 Answers  


Categories