sqlcmd
Microsoft's command-line client for running queries against SQL Server and Azure SQL.
Open source (MIT)By Microsoft
Compare sqlcmd with another product
1 more way to get sqlcmd
Homebrew
brew install sqlcmd
Alternatives
SQL Server (mssql) extension for VS Code
SQL Server Management Studio
SQLPro for MSSQLMySQL Shell
Microsoft SQL Server 2022 Developer Edition
pspg
About sqlcmd
sqlcmd is the newer, Go-based version of Microsoft's command-line tool for SQL Server and Azure SQL. It connects to a database and runs queries and scripts from the terminal.
Beyond querying, it can create a local SQL Server instance with sqlcmd create mssql and open a connection in Azure Data Studio with sqlcmd open ads. On Windows it installs with winget install sqlcmd. It suits developers and database administrators who script SQL Server work.
Strengths
- Runs queries and scripts against SQL Server and Azure SQL
- Can spin up a local SQL Server instance
- Installs with winget or Homebrew
- Open source under MIT
Limitations
- Limited to Microsoft SQL Server and Azure SQL
- Command-line only
Details
- Pricing
- FreeFree and open source under the MIT licence.
- License
- MIT
- Developer
- Microsoft
- Platforms
- Windows, macOS, Linux, Command line
- How it runs
- Downloadable app
- Account
- Not required
- Best suited for
- Scripting and querying SQL Server or Azure SQL from a terminal
- Categories
- CLI tools, Database tools
- Last verified
- Added