connect to SQL server from shell script

Hi all,

I need to connect to SQL server from shell script. Then need to execute queries from shell script as below

  1. To compare values of an array with SQL table's entry.

Kindly let me know on how to do this

Thanks,