Page 1 of 1

Strange behavior on SELECT+DROP

Posted: Thu Aug 01, 2013 12:16 pm
by VerticalMan
When I execute a SELECT to my TestTable, output is as expected,

vsql -dX -c "SELECT * FROM TestTable;"

but when I introduce something like:

vsql -dX -c "SELECT * FROM TestTable; DROP TABLE IF EXISTS TestTable;"

Does not show anything and does not throw an error neither

Does anybody know the cause?

Re: Strange behavior on SELECT+DROP

Posted: Thu Aug 01, 2013 12:59 pm
by id10t
Hi!

Option "-c" executes single command only.

Code: Select all

$ vsql --help
...
  -c COMMAND      run only single command (SQL or internal) and exit
Pipe the string into vsql, like this(for executing multiply commands) :

Code: Select all

echo 'SELECT * FROM bar; SELECT * FROM foo;' | vsql