ALLInterview.com :: Home Page            
 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                      
Google
   
 
Categories >> Software >> Microsoft Related >> VB.NET
 
 


 

 
 Visual Basic interview questions  Visual Basic Interview Questions (614)
 C Sharp interview questions  C Sharp Interview Questions (721)
 ASP.NET interview questions  ASP.NET Interview Questions (1442)
 VB.NET interview questions  VB.NET Interview Questions (150)
 COM+ interview questions  COM+ Interview Questions (41)
 ADO.NET interview questions  ADO.NET Interview Questions (198)
 IIS interview questions  IIS Interview Questions (86)
 MTS interview questions  MTS Interview Questions (5)
 Crystal Reports interview questions  Crystal Reports Interview Questions (62)
 BizTalk interview questions  BizTalk Interview Questions (33)
 Dot Net interview questions  Dot Net Interview Questions (861)
 Exchange Server interview questions  Exchange Server Interview Questions (103)
 SharePoint interview questions  SharePoint Interview Questions (25)
 WCF interview questions  WCF Interview Questions (8)
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions (193)
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 ?    18 Yes 4 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 ?    15 Yes 3 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 ?    5 Yes 19 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 ?    8 Yes 1 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 2 No
Ramavtar Rajput
 
  Re: sql satement for 2nd maximum value
Answer
# 6
Rohan answer given by you was not working..... 
Is This Answer Correct ?    6 Yes 3 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 ?    3 Yes 3 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 ?    3 Yes 5 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 ?    7 Yes 2 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 ?    4 Yes 4 No
Kaushal Gajjar
 

 
 
 
Other VB.NET Interview Questions
 
  Question Asked @ Answers
 
What is CLR? Horizon-Computers 20
Write a program that accepts an array of numbers and a number, and return a string “Yes” if the number is found in the array, “No” if the number is not found in the array.   2
I want to sample Hotel management project in vb.net because still now i am doing that project for small hotel....so please send me my email id is jmuthu_pearls@yahoo.com... TATA 4
is ADO.NET important to connect sql server? is any other way to connect sql server?   1
What is the DIfference between Friend and Protected Friend? CTS 6
code for itemstockgroupwise record?   1
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
Give the sample code for ItemStockGroupwise Report? CTS 1
What is intermediate language in .NET ? Digital-GlobalSoft 19
How is VB.Net different from VB6? Ksb 7
Write a VB.Net console program to check whether a number is perfect or not. Wipro 1
What is the Difference between Dataset and Datareader?   7
 
For more VB.NET Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright © 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com