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...

i have a table like this
Eno ename
1 a
2 b
3 c

i want to display ename and bossname from table
hint boss is also an employee

Answer Posted / mahesh (ezeesoft)

/---- You need one more column to view manager of each emp
suppose Mno is the column which contains corresponding Eno
as manager id--

select emp.ename , mgr.ename from empTable as emp
SELF JOIN empTable as mgr on emp.Mno = mgr.Eno

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a benefit of using an after insert trigger over using a before insert trigger?

969


what are the core components of SSRS?

127


What causes index fragmentation?

979


Differentiate sql server reporting services vs. Crystal reports?

200


How does recursive cte works in sql server?

990


List some major differences between triggers and stored procedures?

897


What do you understand by user-defined function in the sql server?

937


What is importing utility?

968


Write a SQL query to delete a table?

1124


How to return the top 5 rows from a select query in ms sql server?

1114


How can we check the sql server version?

1036


What are examples of triggers?

1062


New concepts of sql server 2005 use in your project.

2349


What is the openxml statement in sql server?

1054


Explain what is lock escalation and what is its purpose?

919