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

this will also works for u change is id in inner join

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

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you create type- insensitive operator?

1099


What is the use of builtinadministrators group in sql server? : sql server security

1106


How to create median function?

172


What do you mean by acid?

1058


Where is my database stored on the hard disk in ms sql server?

1110


What is ms sql server index?

1149


Explain about system stored procedure?

1077


List the different types of collation sensitivities in sql server?

1076


Write a SQL command to insert and update only a particular field?

1190


How can you check the version of sql server?

1158


Explain about protocol layer present in SQL server?

1292


Can we install sql server 2016 on windows 7?

1196


How can we call UDF(User Define Function) using C# code in ASP.net ?

6947


Why is sql server log file full?

1080


What is the use of for clause?

1163