Sunday, May 15, 2011

SQLite and ANT


The targets that can be run are:
$ ant sqlcreate
$ ant sqlschema
$ ant sqlpopulate
$ ant sqlselect
$ ant sqldrop
The SQLSCHEMA target in the ANT file displays the tables in an SQLite database with this command:
sqlite> SELECT name FROM sqlite_master WHERE type='table';
Other Common Commands
sqlite> .tables
sqlite> .schema [TABLE] (such as Customers table)
sqlite> explain [SQL COMMAND] 
sqlite> .separator [CHARACTER] (such as comma or vertical bar)
sqlite> .databases
sqlite> .read [FILENAME]
Termination Commands to terminate a line
semicolon ;
GO
forward slash /