What is a self join? Explain it with an example?

Answer Posted / dhivya

lets take a table A which is joined to itself with its
alias is said to be self join.Most familiar example is
finding the manager of the employee..

select e1.emp_id manager_id,e2.emp_id employee_id from
employee e1,employee e2
where e1.emp_id=e2.emp_id

Is This Answer Correct ?    66 Yes 37 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the rollup operator?

598


explain detail about ftp in datastage?

1797


What are the 18 schemas?

600


What is a database development?

509


Explain the role of indexing in databases?

632






Can an extended stored procedure be called from inside a user-defined function?

598


Who are naive users?

590


Explain about the database management systems.

557


What is database design and development?

595


What are the three basic rules which are to be followed for the relational model of the database?

551


How to replace not in with not exist?

1448


What is normalization? Explain different levels of normalization?

59742


Explain what a database is?

596


How can I detect whether a given connection is blocked?

571


Explain about relational database management systems?

554