>
Why do you want to do that?I want to validate the SQL syntax and preferably in the browser using some kind of linter.
>You can always run it inside transaction and rollback at the end.
Sounds dangerous and will make the server very active because it is executing the SQL.
Yes, the SQL should be tested even if the syntax is correct.
So 2 things to look for:
- Syntax validator
- Check query logic, like does the table exist
Best,
Peter