How do I check SQLite3 syntax?

Posted by Benjamin Oakes on Stack Overflow See other posts from Stack Overflow or by Benjamin Oakes
Published on 2010-05-27T18:32:26Z Indexed on 2010/05/27 18:41 UTC
Read the original article Hit count: 263

Filed under:
|

Is there a way to check the syntax of a SQLite3 script without running it?

Basically, I'm looking for the SQLite3 equivalent of ruby -c script.rb, perl -c script.pl, php --syntax-check script.php, etc.

I've thought of using explain, but most of the scripts I'd like to check are kept around for reference purposes (and don't necessarily have an associated database). Using explain would also make it hard to use with something like Syntastic. (That is, I'm only wanting to check syntax, not semantics.)

© Stack Overflow or respective owner

Related posts about sqlite3

Related posts about syntax-checking