Click here to Skip to main content
15,884,353 members
Articles / Database Development / SQL Server / SQL Server 2012

SQL Server: TOP…WITH TIES - A Beauty of TSQL

Rate me:
Please Sign up or sign in to vote.
4.38/5 (8 votes)
19 Apr 2013CPOL1 min read 87.3K   12  
The TOP clause is commonly used to get the top required rows from a result set. The beauty of this clause is that it can be used with the WITH TIES clause to retrieve all similar rows to a base result set.

Views

Daily Counts

License

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


Written By
Team Leader CureMD
Pakistan Pakistan
Aasim Abdullah is working as SQL Server DBA with CureMD (www.curemd.com) based in NY, USA. He has been working with SQL Server since 2007 (Version 2005) and has used it in many projects as a developer, administrator, database designer. Aasim's primary interest is SQL Server performance tuning. If he finds the time, he like to sketch faces with graphite pencils.

Comments and Discussions