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

What are the different types of triggers in SQL SERVER?

1050


Which are the two editions in which SQL Azure database available?

117


What are synonyms?

913


How do we know if any query is retrieving a large amount of data or very little data?

922


Explain view in sql server?

1009


What are the new features in sql server 2016?

930


How to use the inserted and deleted pseudo tables?

916


Explain Capacity planning to create a database? and how to monitor it?

4143


In which sql server version report builder introduced?

142


What is the difference between push and pull subscription? : sql server replication

1150


How to declare and use cursor variables?

1078


How to return the top 5 rows from a select query in ms sql server?

1076


What are the different index configurations a table can have?

901


What command is used to rename the database?

947


What is command parameter in ssrs?

153