Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Online SQL syntax checker conforming to multiple databases [closed]

Is there any site available online for verifying the syntax which conforms to multiple databases?

For example: If I have a SQL statement with a 'usage' keyword, then the site should throw me an error saying that 'usage' keyword is reserved in MYSQL?

like image 617
Phani Avatar asked Feb 16 '11 11:02

Phani


People also ask

How do you check SQL query is correct or not online?

EverSQL Validator is a free online syntax checker for MySQL SQL statements. The validator will compile and validate SQL queries to report for syntax errors.

Can I query from two different databases?

For querying multiple tables in different databases on the same server, all we have to do is use the fully qualified table name. The only condition is, the user logged into the query analyzer (or used for executing the query) should have permission on both the databases.

How do I verify SQL?

To verify an SQL statementRight-click in the SQL Pane, and select Verify SQL Syntax from the shortcut menu.


2 Answers

You could try a formatter like this

They will always be limited because they don't (and can't) know what user defined functions you may have defined in your database (or which built-in functions you have or don't have access to).

You could also look at ANTLR (but that would be an offline solution)

like image 91
Gary Myers Avatar answered Oct 09 '22 09:10

Gary Myers


Have you tried http://www.dpriver.com/pp/sqlformat.htm?

like image 7
Infotekka Avatar answered Oct 09 '22 09:10

Infotekka