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...


Following are some of the question related to below
mentioned query?

select e1.salary from employee3 e1
where 2=
(
select count(distinct(e2.salary))
from employee3 e2 where e2.salary>=e1.salary
)

1) What the query returns?

2) How it works? - Detail explanation (what the sub query
does, why it is (where 2=)....etc...Please?

Answers were Sorted based on User's Feedback



Following are some of the question related to below mentioned query? select e1.salary from empl..

Answer / ashok

Hi

1.Here query will return 2nd highest salary
2.here 2= i.e 2nd heigest similary if we set N in place
of 2 then it will returen Nth heigest salary
where n =1,2,3,4.....

Hope it will help u

Ashok

Is This Answer Correct ?    4 Yes 0 No

Following are some of the question related to below mentioned query? select e1.salary from empl..

Answer / ashok

Hi

1.Here query will return 2nd highest salary
2.here 2= i.e 2nd heigest similary if we set N in place
of 2 then it will returen Nth heigest salary
where n =1,2,3,4.....

Hope it will help u

Ashok

Is This Answer Correct ?    3 Yes 0 No

Following are some of the question related to below mentioned query? select e1.salary from empl..

Answer / suraj

This query does execute, you stupid.
Have some self respect. Do not post comments unless you are
very sure about it.

Is This Answer Correct ?    1 Yes 0 No

Following are some of the question related to below mentioned query? select e1.salary from empl..

Answer / haris

yah this query works fine and return the 2nd highest salary.

Is This Answer Correct ?    0 Yes 0 No

Following are some of the question related to below mentioned query? select e1.salary from empl..

Answer / chintan

First of all this query doesn't execute. I tried it on SQL
2005 and kept getting error.

Is This Answer Correct ?    0 Yes 5 No

Post New Answer

More SQL Server Interview Questions

Explain what are the basic functions for master, msdb, model, tempdb databases?

0 Answers  


What is order of B+tree?

0 Answers   HCL,


What is checkpoint in sql server?

0 Answers  


How to replace given values with null using nullif()?

0 Answers  


What is inner join in sql server joins?

0 Answers  


What is clustered primary key?

0 Answers  


Can sql servers linked to other servers like oracle?

0 Answers  


wat is mean by trigger?.......normally wat use......when trigger used in sql........... plz cleary say with example.......

2 Answers   TCS, Wipro,


How can I create a plain-text flat file from SQL Server as input to another application?

2 Answers  


If a user does not have permission to a table, but has permission to a view created on it, will he be able to view the data in table?

0 Answers  


What is Stored Procedure? What is Views in sql server? Difference between a User Defined Function and a Stored Procedure Difference between a primary key and a unique key? What is a join and explain different types of joins. Difference between temp table and table variable Difference between Triggers and Stored Procedures Difference between UNION ALL Statement and UNION What is COALESCE / Why do we use COALESCE? Why we use SET ROWCOUNT in Sql How many clustered index can have a table How many types of local tables in SQL SERVER Difference between DELETE and TRUNCATE What is Aggregate Functions? What is Row_Number()? What are Ranking Functions? What is NOLOCK? What is CTE? What are the Advantages of using CTE? What is the STUFF function and how does it differ from the REPLACE function? What are the difference between clustered and a non-clustered index? What are the different index configurations a table can have? Difference between a HAVING CLAUSE and a WHERE CLAUSE? Difference between SET and SELECT Provide all the built in string function of SQL SERVER Difference between char and varchar data types Define candidate key, alternate key, composite key. What are constraints? Explain different types of constraints. What is a self join? Explain it with an example. How will you convert table row to a column comma separated value

4 Answers   ACS,


Is it possible to run multiple publications and different type of publications from the same distribution database? : sql server replication

0 Answers  


Categories