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
How to generate create function script on an existing function?
how can a database be repaired? : Sql server administration
What are “lock” hints?
How to see the event list of an existing trigger using sys.trigger_events?
What program is used to store the data source file?
How do I create a stored procedure in dbml?
Explain powershell included in sql server 2008?
How do I trace a query in sql server?
What are pessimistic lock and optimistic lock?
What is rolap and its advantage? : sql server analysis services, ssas
What is the difference between a stored procedure and a user defined function?
Can we take the full database backup in log shipping?
Which are the olap features?
Can you please explain the difference between primary keys and foreign keys?
Explain an automatic checkpoint