GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Tech FAQs  >  SQL

 Print  |  
Question:  What is the Querry for retrieving the 2nd highest salary in a table?



March 03, 2006 08:40:46 #6
 Ed Di Database Expert  Member Since: March 2006    Total Comments: 46 

RE: What is the Querry for retrieving the 2nd highest ...
 

doesn't it appear from the volume of code in your solution that it is not optimal. It's clearly like using a sledge hammer to crush a walnut. In the real world no one would bear the overhead of this solution when the others on the page do the same thing without creating tables and certainly without that last join step.

SQL is a non-procedural language, your solution is completely procedural.

     

 

Back To Question