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
What you can do to remove data from the cache and query plans from memory for testing the performance of a query repeatedly?
Explain about post-relational databases?
How to use online Backups?
Write short notes on manual refreshes.
Explain the role of indexing in databases?
Who are naive users?
What is DB Development software?
There is a trigger defined for INSERT operations on a table, in an OLTP system. The trigger is written to instantiate a COM object and pass the newly insterted rows to it for some custom processing. What do you think of this implementation? Can this be implemented better?
Write the fastest query to find out how many rows exist in a table?
You have two tables with a one to many join based on a field named id. You need to find records in the parent table that are not represented in the child table. how would you accomplish this?
What is the physical representation for a many-to-many relationship?
What is dbms explain in brief?
Explain about a primary key?
Explain the rollup operator?
Explain about network model?