SQL Validator checks your queries for syntax errors, missing WHERE clauses on DELETE/UPDATE, unbalanced parentheses, unclosed strings, and performance warnings like SELECT * and leading wildcard LIKE patterns — all in your browser with no upload.
Formatted SQL will appear here…About SQL Formatter
SQL Validator checks your queries for syntax errors, missing WHERE clauses on DELETE/UPDATE, unbalanced parentheses, unclosed strings, and performance warnings like SELECT * and leading wildcard LIKE patterns — all in your browser with no upload.
Frequently Asked Questions
What does the SQL Validator check?
It checks for: unclosed string literals, unbalanced parentheses, DELETE/UPDATE without WHERE clause (critical error), SELECT * usage (performance warning), leading wildcard LIKE patterns that cannot use indexes, subquery usage (suggest CTE instead), and missing semicolons.
What is the DELETE without WHERE error?
A DELETE statement without a WHERE clause deletes ALL rows in the table. This is a critical error flagged in red. Always add a WHERE clause or use TRUNCATE TABLE if you intentionally want to delete all rows.
Why is SELECT * a warning?
SELECT * retrieves all columns including ones you may not need, preventing index-only scans and increasing network transfer. Specifying column names explicitly improves query performance and maintainability.
What is the leading wildcard LIKE warning?
LIKE '%search%' with a leading % cannot use B-tree indexes and requires a full table scan. Consider a full-text search index (FULLTEXT in MySQL, tsvector in PostgreSQL) for better performance on large tables.
Does it validate dialect-specific syntax?
The validator checks common SQL issues that apply across all dialects. For dialect-specific syntax validation, select the appropriate dialect in the Dialect bar so the formatter correctly recognizes dialect keywords.