A view orders its rows with TOP 100 PERCENT ... ORDER BY, which SQL Server ignores
What it finds
CREATE VIEW v AS SELECT TOP 100 PERCENT ... ORDER BY x is accepted by SQL Server, but the optimizer drops both, so the view returns rows in any order. Ordering belongs in the query that reads the view.
From the rule's source, top_percent_order.rs.
Turn it on, off or suppress it
The rule runs from the recommended tier up. To turn it on in a lower tier, give it a level in tx0.toml:
[rules]
"tx0/sql:top-percent-order" = "warning"To keep one finding, suppress it with a reason: tx0 suppress ID --reason "..." writes the comment for it.
tx0 explain tx0/sql:top-percent-order shows the same in the terminal. Found a false positive? Report it.