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
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?
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?
How to combine two function together?
Explain about the hierarchical model of the database?
You have a table with three columns: amount1, amount2, and amount3 in a single row only one of these three columns will have a value and the other two will be null. Write a sql query to retrieve the values from these columns?
Explain about query and reporting.
What is a database development?
Explain about network model?
Explain the cube operator?
What is the physical representation for a many-to-many relationship?
What are the three types of database design?
How long can an error message be in raiseerror function?
What are the types of database model?
Who are end users in dbms?
fact table and dimension table containg one to many relationship or many to one relastionship