I my experience, using EXPLAIN is not enough. I often need to create scripts that involve several queries in which the first few queries create new objects and the next queries make a reference to the objects created at the beginning. In such case, if I use EXPLAIN, the last queries fail because the new objects don't exist yet. Creating those objects is not an option as I don't always have access to create objects in some databases. It's true that I can create a development environment to test my queries, but that means I have to point the script to different databases (wherever my development environment is) and that involves me editing the script to test it and then having to edit it again for it to point to the right database. Editing the script before sending it to the DBA for him/her to execute is exactly what I don't want to do. I would like to be able to take my final script and test it as it is without having to touch it. Only using EXPLAIN, that is NOT possible.
Does anybody know any other option to check for syntax errors without having the rights to create objects in the databases being referenced?