SQL Flow Field Guide

TOP ... PERCENT

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

percentage limiter

What changes

Input
ordered rows
Output or change
N percent of rows

Syntax at a glance

TOP ( expression ) PERCENT

Work example

A sample or report needs a percentage of the ordered result rather than a fixed row count.

Run the query with a stable ORDER BY. Add or remove source rows and note how the selected count changes.

Check your work TOP ... PERCENT. The returned row count follows the percentage and the row choice remains ordered.

Open Microsoft Learn for full syntax, permissions, and details for your version.