SQL Querywise
Start free
Reviewer — Automated Code Review

SQL code review in
seconds, not hours.

Reviewer runs a full SQL code audit — security vulnerabilities, naming conventions, style consistency, and best practices — with structured findings ready for your PR comments.

Try Reviewer free
3 free uses after sign-up No credit card required $4/month after free tier

What Reviewer produces

Input: a stored procedure with dynamic SQL. Output: security findings, naming issues, style violations — all with Rule IDs and fixes.

reviewer_output.mdReviewer
## Code Review Score: 6/10

## Security Issues

### 🔴 Critical — SQL_INJECTION_RISK (Severity 5)
**Finding:** Dynamic SQL built with string concatenation — SQL injection risk.
```sql
-- ❌ Vulnerable
SET @sql = 'SELECT * FROM users WHERE name = ''' + @name + ''''
EXEC(@sql)

-- ✅ Safe: use sp_executesql with parameters
EXEC sp_executesql
  N'SELECT * FROM users WHERE name = @name',
  N'@name NVARCHAR(100)',
  @name = @name
```

## Naming Convention Issues

### 🟠 High — NAMING_ALIAS (Severity 2)
**Finding:** Column aliases use single letters (a, b, c). Use descriptive names.
- `a` → `customer_id`
- `b` → `total_revenue`

### 🟡 Medium — NAMING_TABLE_PREFIX (Severity 2)
**Finding:** Table alias 'tbl_' prefix is redundant — SQL Server already knows it's a table.

## Style Issues

### 🔵 Info — KEYWORD_CASE (Severity 1)
**Finding:** Mixed keyword casing detected. Use consistent UPPERCASE for all SQL keywords.
- Line 3: `select` → `SELECT`
- Line 7: `from` → `FROM`

## Summary
| Category | Issues |
|----------|--------|
| Security | 1 critical |
| Naming | 2 issues |
| Style | 1 info |
| **Total** | **4 findings** |

Code review that doesn't miss anything

Security, style, naming, and best practices — all in one structured report.

SQL injection detection

Identifies dynamic SQL built with string concatenation — the most common SQL injection vector in enterprise T-SQL codebases.

Naming convention enforcement

Checks table names, column aliases, variable names, and object prefixes against configurable naming standards.

Style consistency

Enforces keyword casing, indentation patterns, and formatting rules so your entire codebase reads the same way.

Maintainability checks

Flags SELECT *, hardcoded values, magic numbers, missing comments on complex logic, and other patterns that make code hard to maintain.

Best practices audit

Checks against 53 enterprise T-SQL rules including SET NOCOUNT ON, schema prefixes, transaction handling, and error handling patterns.

Structured review output

Every finding includes a Rule ID, severity level, the problematic code, and the corrected version — structured for commit comments or Jira tickets.

When to use Reviewer

1

Pull request reviews

Run Reviewer before merging any SQL change. Get a structured list of issues to address — faster than manual review, more consistent than memory.

2

Security audits

Scan stored procedures for SQL injection patterns, hardcoded credentials, and excessive permissions before a security review.

3

Codebase standardisation

Run Reviewer across your entire stored procedure library to identify naming and style inconsistencies accumulated over years.

4

Junior developer feedback

Use Reviewer output as structured feedback for junior Data Engineers — specific, actionable, and educational.

Reviewer FAQ

Can I customise the naming conventions Reviewer checks?

Custom rule configuration is on the roadmap. Currently Reviewer uses enterprise T-SQL best practices as the standard.

Does Reviewer detect all SQL injection patterns?

Reviewer detects the most common T-SQL injection patterns (string concatenation in dynamic SQL, EXEC with user input). It is not a replacement for a full security audit.

Can Reviewer check an entire stored procedure file?

Yes. Paste the full CREATE PROCEDURE statement including all parameters and logic. Reviewer analyses the complete object.

Try Reviewer — 3 free uses after sign-up

Sign in to run Reviewer on your own SQL queries. 3 free uses — no credit card required.

Start free

Reviewer

$4/month

3 free uses after registration. No credit card required.

Start free
Security vulnerability detection
Naming convention checks
Style consistency audit
Best practices (53 rules)
Structured PR-ready output