DF076: TOP (100) PERCENT is used.
Last modified: June 12, 2025
The topic describes the DF076 T-SQL code analysis rule.
Category
BEST PRACTICE
Message
TOP (100) PERCENT
is used.
Description
In recent versions of SQL Server, the TOP (100) PERCENT
clause is meaningless and is ignored by the query processor. It is recommended to exclude it from the query.
Additional information
Using TOP (100) PERCENT
can create the false impression that query results are limited or ordered, even though it has no functional impact. It may also interfere with query rewrites or view optimization. To keep your code clean and maintainable, avoid using TOP (100) PERCENT
unless required for backward compatibility or specific tooling constraints.
Noncompliant code example
SELECT TOP(100) PERCENT c.FirstName, c.LastName
FROM dbo.Customer c
ORDER BY c.Id;
GO
Compliant solution
SELECT c.FirstName, c.LastName
FROM dbo.Customer c
ORDER BY c.Id;
GO
Want to find out more?
Overview
Take a quick tour to learn all about the key benefits delivered by dbForge Studio for SQL Server.
All features
Get acquainted with the rich features and capabilities of the tool in less than 5 minutes.
Request a demo
If you consider employing this tool for your business, request a demo to see it in action.