Use this query
SELECT
MIN(s.Payment), e.EmpName, e.EmpID
FROM
dbo.Employee e
INNER JOIN
Salary s ON e.EmpID = s.EmpID
WHERE
e.EmpID IN (SELECT TOP 2 EmpID FROM dbo.Salary ORDER BY Payment DESC)
More Related Contents:
- incorrect syntax near keyword where [closed]
- Check if table exists in SQL Server
- How to get a float result by dividing two integer values using T-SQL?
- Cannot resolve the collation conflict between “SQL_Latin1_General_CP1_CI_AS” and “Latin1_General_CI_AS” in the equal to operation
- Select columns with NULL values only
- Import Multiple CSV Files to SQL Server from a Folder
- Incorrect syntax near ‘GO’
- Effectively Converting dates between UTC and Local (ie. PST) time in SQL 2005
- Oracle: is there a tool to trace queries, like Profiler for sql server? [closed]
- SQL Server – Remove all non-printable ASCII characters
- Regular Expressions in SQL Server servers?
- Unique constraint on multiple columns
- Diagnosing Deadlocks in SQL Server 2005
- What is a simple command line program or script to backup SQL server databases?
- Disadvantages of MARS (Multiple Active Result Sets)?
- SQL Server Output Clause into a scalar variable
- Replace single quotes in SQL Server
- Why is sql server storing question mark characters instead of Japanese characters in NVarchar fields?
- sql use statement with variable
- How to create a yes/no boolean field in SQL server?
- How do I select last 5 rows in a table without sorting?
- displaying multiple records by using resultset
- How to display two digits after decimal point in SQL Server
- Copy table to a different database on a different SQL Server
- Include missing months in Group By query
- SQL Server equivalent to Oracle’s CREATE OR REPLACE VIEW
- In SQL Server, how can I find everywhere a column is referenced?
- Using Full-Text Search in SQL Server 2008 across multiple tables, columns
- Oracle sequence but then in MS SQL Server
- Convert float into varchar in SQL Server without scientific notation