What is a self join? Explain it with an example?
Answer Posted / mike
You lost one Anju as Employee , because Anju does not have a
manager.
You should use left outer join in this case.
select e1.emp_name 'manager',e2.emp_name 'employee'
from employees e1 left outer join employees e2
on e1.emp_id=e2.emp_manager_id
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
You are testing the performance of a query the first time you run the query, the performance is slow. the second time you run the query, the performance is fast. why is this?
Any sample or model question of punjab national bank for deputy manger IT or any sample of PNB.any1 plz do send on
Where is dbms used?
What is a database development?
Which four data types cannot be used as a return type from a user-defined function?
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?
Who are end users in dbms?
In which table collections errors are stored.
Explain the process of the user request and data generating?
What is the physical representation for a many-to-many relationship?
What is dbms explain in brief?
How to generate OIDS
What is data modeling with example?
Explain about xml databases?
How would you design a database for an online site, which would average a million hits a day?