Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Write a query to get all details of employee who has maximum
salary from employee table

Answer Posted / anil kumar prajapati

CREATE TABLE Employee_Test
(
Employee_ID INT,
Employee_name Varchar(100),
Employee_Salary Decimal (10,2)
);
INSERT INTO Employee_Test VALUES (1,'Anish',1000);
INSERT INTO Employee_Test VALUES (2,'Sushant',1200);
INSERT INTO Employee_Test VALUES (3,'Rakesh',1100);
INSERT INTO Employee_Test VALUES (4,'Manoj',1300);
INSERT INTO Employee_Test VALUES (5,'Amit',1400);
INSERT INTO Employee_Test VALUES (6,'Lokesh',1600);
INSERT INTO Employee_Test VALUES (7,'Maneneder',1400);
INSERT INTO Employee_Test VALUES (8,'Narendra',400);
INSERT INTO Employee_Test VALUES (9,'Kaushal',1900);
INSERT INTO Employee_Test VALUES (10,'Vikas',3400);
INSERT INTO Employee_Test VALUES (11,'Sudhir',800);
SELECT *FROM Employee_Test Emp1
WHERE ( n ) = (SELECT COUNT( DISTINCT (Emp2.Employee_Salary
) )
FROM Employee_Test Emp
WHERE Emp2.Employee_Salary >= Emp1.Employee_Salary
)

Is This Answer Correct ?    6 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the flow of creating a cube? : sql server analysis services, ssas

1056


What is the function of sql server agent windows service?

1102


What are relationships and mention different types of relationships in the dbms

965


When I run the sql server 2000 setup, it just hangs. What do I do?

1089


Is it possible to import data directly from t-sql commands without using sql server integration services? If so, what are the commands?

1403


How to view existing indexes on an given table using sp_help?

1141


Is ssrs support other database except ms sql server?

142


What are the restrictions applicable while creating views? : SQL Server Architecture

1031


why does a sql statement work correctly outside of a user-defined function, but incorrectly inside it? : Sql server administration

1081


How to verify a login name with sqlcmd tool?

1229


What are the character string functions supported by sql server 2005?

1017


What are sql servers used for?

1053


How to provide login information for a new odbc dsn?

1052


What are the restrictions that views have to follow? : SQL Server Architecture

1007


What is a matrix in ssrs?

153