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


sql satement for 2nd maximum value

Answers were Sorted based on User's Feedback



sql satement for 2nd maximum value ..

Answer / archana chavan

select top 1 * from author where phone < (select max(phone)
from author) order by phone desc

Is This Answer Correct ?    18 Yes 4 No

sql satement for 2nd maximum value ..

Answer / murli d

author is Table name
ID is column name

select top 1 * from author where ID < (select max(ID)
from author) order by ID desc

Is This Answer Correct ?    16 Yes 3 No

sql satement for 2nd maximum value ..

Answer / cherran

select top 1 sal from
( select top 2 sal from test order by sal desc ) as kk order
by sal

Is This Answer Correct ?    8 Yes 2 No

sql satement for 2nd maximum value ..

Answer / avnish

create table emp with row empsal having the datatype float
and insert some salary
now to get the second max salary
write the sql statement

select max(empsal) from emp where empsal<(select max(empsal)
from emp)
its asubquery

Is This Answer Correct ?    8 Yes 2 No

sql satement for 2nd maximum value ..

Answer / sonia

Rohan answer given by you was not working.....

Is This Answer Correct ?    6 Yes 3 No

sql satement for 2nd maximum value ..

Answer / sanjeev singla

Hey guys use this query ,i used it so many time ,it will be
useful to you..try this one...

SELECT MAX(Salary) AS Expr1
FROM Employees
WHERE (Salary <
(SELECT MAX(Salary)
FROM Employees))

Is This Answer Correct ?    3 Yes 1 No

sql satement for 2nd maximum value ..

Answer / ramavtar rajput

select Amount from T2 where Amount = ( select max(Amount)
from T2 where Amount < ( select max(Amount) from T2 ))

Is This Answer Correct ?    3 Yes 3 No

sql satement for 2nd maximum value ..

Answer / kaushal gajjar

select top 1 UnitsInStock
from products
where UnitsInStock in (select top 2 UnitsInStock from
products order by UnitsInStock desc)

Is This Answer Correct ?    4 Yes 4 No

sql satement for 2nd maximum value ..

Answer / suresh

department as table name,sfee as column name
SELECT TOP (1) sfee
FROM DEPARTMENT
WHERE (SFEE IN
(SELECT TOP (2) SFEE
FROM DEPARTMENT AS
DEPARTMENT_1
ORDER BY SFEE DESC))

Is This Answer Correct ?    1 Yes 1 No

sql satement for 2nd maximum value ..

Answer / jacob

1)Select Max(Total) from mark


2)select top 1 total from
( select top 2 total from mark order by total desc ) as
result order
by Total

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More VB.NET Interview Questions

How to Insert a TextBox value in to Sql database using VB.Net coding?

5 Answers  


what is the root namespace for all types?

8 Answers  


Trace and Debug belongs to which namespaces?

5 Answers  


Why do we use ansi keyword?

0 Answers  


What are the technology areas that microsoft.net contains?

0 Answers  


how to call a list box on the text if some one send me the code for it

1 Answers  


Explain the services provided by common language infrastructure.

0 Answers  


Described strong typing and weak typing?

0 Answers  


Explain the observations between vb.net and vc#.net?

0 Answers  


How do you call a stored procedure in Visual Basic?

0 Answers   CGI,


Hi I am planning to take interview in VB.net,can any one share your interview Questions for a Entry-level job. Regards Lina

3 Answers  


Explain private assembly?

0 Answers  


Categories