Binary package “sqsh” in ubuntu precise

commandline SQL client for MS SQL and Sybase servers

 sqsh is a flexible commandline utility that uses the freetds libraries
 to connect to Sybase or Microsoft SQL servers. It is a useful debugging
 tool for identifying problems with other SQL applications, and it can be
 used as a productivity tool in its own right: unlike most SQL CLIs, sqsh's
 interactive shell lets you pipe the output of SQL queries directly to other
 Unix commands for further processing.