https://github.com/vermontdepartmentofhealth/sql-cli
A set of command line utilities for MS SQL Server
https://github.com/vermontdepartmentofhealth/sql-cli
Last synced: about 2 months ago
JSON representation
A set of command line utilities for MS SQL Server
- Host: GitHub
- URL: https://github.com/vermontdepartmentofhealth/sql-cli
- Owner: VermontDepartmentOfHealth
- License: mit
- Created: 2020-06-15T17:46:04.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T20:59:16.000Z (over 2 years ago)
- Last Synced: 2025-04-13T05:33:33.285Z (about 2 months ago)
- Language: JavaScript
- Size: 368 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Contributing: Contributing.md
- License: LICENSE
Awesome Lists containing this project
README
# SQL CLI
A set of command line utilities for MS SQL Server
## Install
```
npm install @ads-vdh/sqlutil -g
```## Usage (Examples)
```bash
sqlutil -s "SELECT 2 AS Age" -t "SELECT 1 + 1 AS Age" -sv ServerName -db dbName
sqlutil -s "EXEC dbo.GetClient1 17" -t "EXEC dbo.GetClient2 17" -sv ServerName -db dbName
```## Env File (Optional)
Optionally add an env file to specify server name and database name with the following structure:
```ini
SQL_CLI_SERVER=YourServerName
SQL_CLI_DATABASE=YourDatabaseName
```