ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  VB.NET
 
 


 

 
 Visual Basic interview questions  Visual Basic Interview Questions
 C Sharp interview questions  C Sharp Interview Questions
 ASP.NET interview questions  ASP.NET Interview Questions
 VB.NET interview questions  VB.NET Interview Questions
 COM+ interview questions  COM+ Interview Questions
 ADO.NET interview questions  ADO.NET Interview Questions
 IIS interview questions  IIS Interview Questions
 MTS interview questions  MTS Interview Questions
 Crystal Reports interview questions  Crystal Reports Interview Questions
 BizTalk interview questions  BizTalk Interview Questions
 Dot Net interview questions  Dot Net Interview Questions
 Exchange Server interview questions  Exchange Server Interview Questions
 SharePoint interview questions  SharePoint Interview Questions
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions
Question
sql satement for 2nd maximum value
 Question Submitted By :: Mahadev
I also faced this Question!!     Rank Answer Posted By  
 
  Re: sql satement for 2nd maximum value
Answer
# 1
select top 1 * from author where phone < (select max(phone) 
from author) order by phone desc
 
Is This Answer Correct ?    6 Yes 2 No
Archana Chavan
 
  Re: sql satement for 2nd maximum value
Answer
# 2
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 ?    6 Yes 1 No
Murli D
 
 
 
  Re: sql satement for 2nd maximum value
Answer
# 3
Select * from author where rownum=2
order by ID desc
 
Is This Answer Correct ?    1 Yes 5 No
Rohan Patil
 
  Re: sql satement for 2nd maximum value
Answer
# 4
select top 1 sal from 
( select top 2 sal from test order by sal desc ) as kk order
by sal
 
Is This Answer Correct ?    4 Yes 0 No
Cherran
 
  Re: sql satement for 2nd maximum value
Answer
# 5
select Amount from T2   where Amount = ( select max(Amount)
from T2  where Amount < ( select max(Amount) from T2 ))
 
Is This Answer Correct ?    3 Yes 0 No
Ramavtar Rajput
 
  Re: sql satement for 2nd maximum value
Answer
# 6
Rohan answer given by you was not working.....
 
Is This Answer Correct ?    4 Yes 2 No
Sonia
 
  Re: sql satement for 2nd maximum value
Answer
# 7
select distinct top 2 salary from employee order by salary 
desc
 
Is This Answer Correct ?    0 Yes 2 No
Manikandan
 
  Re: sql satement for 2nd maximum value
Answer
# 8
Select min(Salary)ThirdHighest from employees where salary 
in (Select top 3 salary from employees order by salary desc)
      For nth replace top 3 with top n
 
Is This Answer Correct ?    1 Yes 2 No
Sunil Nandedkar
 
  Re: sql satement for 2nd maximum value
Answer
# 9
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 ?    3 Yes 1 No
Avnish
 
  Re: sql satement for 2nd maximum value
Answer
# 10
select top 1 UnitsInStock 
from products 
where UnitsInStock in (select top 2 UnitsInStock from 
products order by UnitsInStock desc)
 
Is This Answer Correct ?    1 Yes 3 No
Kaushal Gajjar
 

 
 
 
Other VB.NET Interview Questions
 
  Question Asked @ Answers
 
how to send data to exe file? my code has a button when i press it, an exe file will open. how can i send data as input to the exe file?  2
What does VS.NET contains ? Infosys3
what are the difference between An input box and Message box ..?  3
if user enters 1 or 2 or any other number in digit format in next textbox it should show the answer in word reading like if enters 12 answer should be twelve  4
Difference between VB dll and assemblies in .NET ? Digital-GlobalSoft5
What is an abstract class?  3
how to create views in sql with syntax and example  5
How does you get record no from 5 to 15 from a dataset of 100 records? ABC2
In order to get assembly info whcih namespace we should import?  1
What are Major Feature of VB.NET Over C#.NET  9
How to Insert a TextBox value in to Sql database using VB.Net coding?  3
How do you do multithreading application in VB ? Satyam4
what do you mean by .Net Framework Guru-Tech11
Why Datareader is useful?  5
Can we use a crystal report into a another crystal report  6
hello! I am developing software in vb6 and vb.net separately which i need to generate barcodes e.g i have a string "182346-u",so the problem is that how to generate barcode from this type of string can any body help me please thanks regard !  2
how to get sum of two numbers in vb.net?  3
how to restore database using vb.net? TCS4
hey friends, Firstly I pick the records from the database into the DataGridView, Then I want that If I made any changes to the records in the GridView & Click on Update Button, Changes are Reflected into the main Database .Plz do reply back  3
what is vb.net?  9
 
For more VB.NET Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com