lint_sql
Detect SQL correctness traps, performance risks, and style issues, and verify table and column names against a cached schema.
Instructions
Check a query for correctness traps (NOT IN + NULLs, LEFT JOIN turned INNER by WHERE, join without ON, TOP without ORDER BY), performance problems (functions on filtered columns, SELECT *, NOLOCK, leading-wildcard LIKE) and style. With a connection whose schema is cached, also verifies every table and column exists.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| connection | No |