Text diff
Compare text line by line with clear additions and deletions.
diffFormat SQL indentation and keywords for SQL, MySQL, PostgreSQL and SQLite. Try query examples locally without connecting to a database or executing SQL.
Choose the database dialect and format. Queries are never executed or sent to a database.
select id, name from users where active = true order by id desc;The default SQL dialect separates and indents SELECT, FROM, WHERE and ORDER BY. This example does not connect to a users table.
No. There is no database connection or table access. Output is text only.
No. Successful formatting does not prove that columns exist, permissions are correct or the execution plan is efficient. Validate those separately in an appropriate database environment.
Check the dialect first. Template variables, ORM fragments or database extensions may not parse. Isolate the issue with a minimal valid example instead of changing business conditions in the original query.