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
What language is sql server written in?
Explain the properties of sub-query in sql server?
What is a data collection table?
What is the recursive stored procedure in sql server?
How to disable a login name in ms sql server?
Define primary key?
What are the disadvantages of primary key and foreign key in SQL?
Which is the latest version of sql server and when it is released?
What is Dependency Injection and provide example?
What are points to remember while using the fillfactor argument?
What command is used to create a database in the sql server and how?
You have developed an application which uses many stored procedures and triggers to update various tables users ocassionally get locking problems which tool is best suited to help you diagnose the problem?
What is auditing in sql server?
What are the options which must be set to allow the usage of optimistic models?
What are the differences between lost updates and uncommitted dependencies?