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

please can anyone answer this query

Table 1 has 2 columns: EmployeeId,Age
Table 2 has 2 columns: EmployeeId, Region
Write SQL to Find the region who has the oldest person

Answer Posted / monal

SELECT REGION FROM T2 T2 INNER JOIN
T1 T1 ON T1.EMPID = T2.EMPID INNER JOIN
(SELECT MAX(AGE) AGE FROM T1) TBLAGE ON T1.AGE = TBLAGE.AGE

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can one drop a column from a table?

1025


What is the use of sign function?

1136


What is the use of “join” in sql server?

1108


Difference between LEN() and DATALENGTH() in sql server ?

1125


Working with TLogs

1839


What do you understand by a stored procedure?

1096


How will you add a dimension to cube? : sql server analysis services, ssas

1095


what is a traditional network library for sql servers? : Sql server database administration

963


What is join and name different type of joins?

1053


What is the current pricing model of SQL Azure?

104


How to get the definition of a trigger back?

1005


Is it true that rules do not apply to data already existing in a database at the time the rule is created?

1053


What is SubQuery in SQL Server 2008

1028


Issues related in upgrading SQL Server 2000 to 2005 / 2008

1896


Explain table valued parameters in sql server? Why tvp used?

1028