Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 4th, 2004, 07:53 PM
Registered User
Join Date: Feb 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sumit1228 Send a message via Yahoo to sumit1228
Default Simple and Difficult too

Hi All,
There is a question in an in interview which is as follows:-

There is a table with fields 'empname' and 'sal'. U have to retrieve the empname only having maximmum salary without using subquery and 'top' clause.

Plz let me know the solution of this small thing.

Old February 4th, 2004, 08:42 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 839
Thanks: 0
Thanked 1 Time in 1 Post

Well, you could do the following in SQL Server, but it requires the use of a nonstandard construct:
set rowcount 1
SELECT empname, sal FROM yourtable ORDER BY sal DESC;
Jeff Mason
Custom Apps, Inc.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Transition to .NET..... how difficult? BananaJim ASP.NET 2.0 Basics 3 November 2nd, 2006 12:44 PM
Very Difficult to Follow - Anyone Agree? projectedNexus BOOK: ASP.NET Website Programming Problem-Design-Solution 25 July 31st, 2006 04:39 PM
The difficult part k0023382 Access 1 October 8th, 2004 03:37 AM
Eric it's too difficult eureka BOOK: ASP.NET Website Programming Problem-Design-Solution 2 September 10th, 2004 03:01 AM
Please help - difficult query prob nlicata SQL Language 8 August 12th, 2003 09:02 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.