Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Explain the rollup operator?

1068


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?

2414


Explain about the relational database?

1064


In which database can extended stored procedures be added?

895


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?

961


What are the three types of database design?

1021


What is DB Development software?

2069


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?

955


How can you fix a poorly performing query?

1172


What are the constraints on severity level in raiseerror?

980


Explain about a primary key?

976


What is normalization? Explain different levels of normalization?

63072


To convert IDMS to DB2, how to deal with IDMS occurs and redefined clause?

4004


How can you log an error to the server event log from a stored procedure?

1097


The count() function always returns a int value type what should you do if you need to count rows from a query which you know will return a value that is too large for an int value type?

993