Back to Browse

How to use Top with Ties in SQL Server - TSQL Tutorial Part 114

4.2K views
Aug 20, 2016
9:03

SQL Server / T-SQL Tutorial Scenario: How to use Top with Ties in SQL Server? According to BOL "WITH TIES Used when you want to return two or more rows that tie for last place in the limited results set. Must be used with the ORDER BY clause. WITH TIES may cause more rows to be returned than the value specified in expression. For example, if expression is set to 5 but 2 additional rows match the values of the ORDER BY columns in row 5, the result set will contain 7 rows." Link to scripts used in SQL Server / TSQL Tutorial Video http://www.techbrothersit.com/2016/06/how-to-use-top-with-ties-in-sql-server.html Check out our website for Different SQL Server, MSBI tutorials and interview questions such as SQL Server Reporting Services(SSRS) Tutorial SQL Server Integration Services(SSIS) Tutorial SQL Server DBA Tutorial SQL Server / TSQL Tutorial ( Beginner to Advance) http://www.techbrothersit.com/

Download

0 formats

No download links available.

How to use Top with Ties in SQL Server - TSQL Tutorial Part 114 | NatokHD