Click here to Skip to main content
13,597,671 members
Click here to Skip to main content
Articles » Database » Database » General » Alternatives
Add your own
alternative version

Tagged as


2 bookmarked
Posted 3 Feb 2011
Licenced CPOL

JOIN Instead of Repeating a Subquery

, 6 Feb 2011
As an alternate, I would like to share the following query using the previous table definition using RANK:DECLARE @FirstTable table(FirstName varchar(20))DECLARE @SecondTable table (ID int, FirstName varchar(20), LastName varchar(20), FirstNameHashCode varchar(20), ...


Members may post updates or alternatives to this current article in order to show different approaches or add new features.

2 Feb 2011
1 alternative  
Rather than use multiple subqueries to extract TOP 1 data, this shows you how to use a single TOP 1 JOIN.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Goutam Patra
Technical Lead
India India
No Biography provided

| | Privacy | Cookies | Terms of Use | Mobile
Web01-2016 | 2.8.180621.3 | Last Updated 7 Feb 2011
Article Copyright 2011 by Goutam Patra
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid