sqlcmd

Microsoft SQL Server command-line query and scripting utility

brewmacoslinux
Try with needOr install directly
Source

About

Microsoft SQL Server command-line interface

Commands

sqlcmd

Examples

Connect to a SQL Server instance and run a query$ sqlcmd -S localhost -U sa -P YourPassword -Q "SELECT @@VERSION"
Execute a SQL script file against a database$ sqlcmd -S localhost -U sa -P YourPassword -d mydb -i script.sql
Connect interactively to a SQL Server instance$ sqlcmd -S myserver.database.windows.net -U user@server -P password