usql
Universal CLI interface for SQL databases. tldr-pages
On several platforms
Several platforms
Connect to a specific database
usql sqlserver://username:password@host:port/database_nameIdentifyExecute commands from a file
usql --file path/to/query.sqlIdentifyExecute a specific SQL command
usql --command "sql_command"Identify[Interactive] Run an SQL command in the usql prompt
commandIdentify[Interactive] Display the database schema
\d[Interactive] Export query results to a specific file
\g path/to/file_with_results[Interactive] Import data from a CSV file into a specific table
\copy path/to/data.csv table_name