adspace


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 / devendra sharma

select ID, region from tab1 where ID in
(select ID from tab2 where isnull(age,0)=(select max(age)
from tab2))

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 view in sql?

1048


If any stored procedure is encrypted, then can we see its definition in activity monitor?

1083


What are the different subsets of sql?

1662


what is the difference between openrowset and openquery?

1208


How to convert character strings into numeric values?

1196


How raid can influence database performance?

1127


Can we do dml on views?

1042


When should you use an instead of trigger?

1062


How do I find the sql server version?

1114


How to rebuild the master database?

1175


Why we use the openxml clause?

1088


do you know how to configure db2 side of the application? : Sql server database administration

1135


What is the difference between for xml raw and for xml auto?

1125


What is clustered index

1094


Why should you use or avoid select * statements?

1120