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 (615)
 C Sharp interview questions  C Sharp Interview Questions (722)
 ASP.NET interview questions  ASP.NET Interview Questions (1444)
 VB.NET interview questions  VB.NET Interview Questions (151)
 COM+ interview questions  COM+ Interview Questions (41)
 ADO.NET interview questions  ADO.NET Interview Questions (199)
 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 (34)
 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 :: VB.NET
I also faced this Question!!     Answer Posted By  
 
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
 
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 ?    16 Yes 3 No
Murli D
 
 
 
Answer
# 3
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
Cherran
 
Answer
# 4
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
 
Answer
# 5
Rohan answer given by you was not working..... 
Is This Answer Correct ?    6 Yes 3 No
Sonia
 
Answer
# 6
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
Sanjeev Singla
 
Answer
# 7
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
Ramavtar Rajput
 
Answer
# 8
select distinct top 2 salary from employee order by salary
desc
 
Is This Answer Correct ?    3 Yes 3 No
Manikandan
 
Answer
# 9
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
 
Answer
# 10
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
Suresh
 

 
 
 
Other VB.NET Interview Questions
 
  Question Asked @ Answers
 
what are the advantage in vb.net and different between vb and vb.net TCS 6
How do you rate yourself in .NET ? Infosys 3
Trace and Debug belongs to which namespaces?   5
How does you call and execute a SP in .NET?   2
linex will support dot net? Phoenix-Technologies 4
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 is the base class of .net?   7
In vb.net how to connect crystal report?   1
Is there any easy way to convert VB6 programs to VB.Net?   3
how to call a list box on the text if some one send me the code for it   1
concept of object oriented programming Patni 6
what are the difference between An input box and Message box ..? TATA 6
 
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