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

table:employee
EID ENAME MID(manager ids)
101 rama null
102 sita 101
103 siva 101
104 ganesh 103
. . .
. . .
for 103 ID the manager ID is 101(RAMA) and for 104 manager
is SIVA
if i give employee id (EID) you have to tell the manager for
that EID write query?
eample:if i give 102 .The query output should be manager for
102 ID that it should print RAMA as output

Answer Posted / samba shiva reddy . m

select emp.ename from employee emp1
inner join employee emp
on emp1.mid=emp.eid
where emp1.eid=102

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do you know what is raid and what are different types of raid configurations? : SQL Server Architecture

1127


How to generate random numbers with the rand() function in ms sql server?

1229


What is difference between primary key and foreign key?

953


What are the basic functions for master, msdb, model, tempdb and resource databases?

1037


What is scheduled job and how to create it?

1038


What is merge statement?

1136


How to specify the collation for a character data type in ms sql server?

1089


Do you know what is sql service broker?

1166


How sql server executes a statement with nested subqueries?

1094


What are cursors? Explain different types of cursors. What are the disadvantages of cursors? How can you avoid cursors?

1222


What is multilevel indexing?

981


Explain cross join or cartesian product in sql?

930


What are the various Operating system files that every SQL server 2005 database has and what is the purpose.

1116


What is field with example?

977


What is update locks?

938