two tables are there.1st table EMP has two columns ID and name and contains data 1,A
2,B
3,C
2nd table EmpSal has 2 columns ID and Salary
Contains data -1,1000
2,5000
3,3000

Find name of employee having maximum salary ?

Answer Posted / gajula.lavanya

SELECT T1.NAME,T2.SAL FROM emp1 T1,emp2 T2
WHERE T1.ID=T2.ID AND T2.SAL=(SELECT MAX(SAL) FROM emp2);

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain having clause?

622


What is the distinction amongst delete and truncate?

661


Define cross join in sql server joins?

658


What is inner join in sql server joins?

627


What is the contrast between sql and mysql?

697






To which devices can a backup be created and where should these devices be located? : sql server management studio

643


What are the advantages dts has over bcp?

625


What is an indice?

666


What is rolap and its advantage? : sql server analysis services, ssas

749


What is explicit cursors?

638


Can you please explain the difference between primary keys and foreign keys?

738


Explain the characteristics of a transaction server for example atomicity, consistency, isolation, durability?

604


Does hive support indexing?

611


How can sql server instances be hidden?

609


Does the unique constraint create an index?

659