jmssql - simple ms sqlserver client.
Simple command-line client for sqlserver, open source of course.
Each line is executed in a separate transaction.
java -jar jmssql-0.0.6-uberjar.jar --sqlfile <sqlstatements.sql> --config <java-properties-file.conf>
java -jar jmssql-0.0.6-uberjar.jar --config <java-properties-file.conf>
jmssql> select * from customer
echo "select * from customer" | java -jar jmssql-0.0.6-uberjar.jar --config <java-properties-file.conf>
or with custom output
echo "select * from customer" | java -jar jmssql-0.0.6-uberjar.jar --config <java-properties-file.conf> --output json
Possible output formats include
- json single json line
- prettyjson json output with pretty printing turned on
- csv comma separated and single-quote delimited values
- headedcsv same as csv, attribute names added as first line
- tab tab separated values, no delimiters
- headedtab same as tab, attribute names added as first line
Complete build with maven
mvn clean javadoc:jar source:jar install package
Have fun