Skip to main content

A cross-platform, cross-database SQL command line tool

Project description

sqlcmd is a SQL command line tool, similar in concept to tools like Oracle’s SQL*Plus, the PostgreSQL psql command, and MySQL’s mysql tool.

Some features at a glance

  • Connection parameters for individual databases are kept in a configuration file in your home directory.

  • Databases can be assigned multiple logical names.

  • sqlcmd has command history management, with GNU Readline support. History files are saved per database.

  • sqlcmd supports SQL, but also supports database metadata (getting a list of tables, querying the table’s columns and their data types, listing the indexes and foreign keys for a table, etc.).

  • sqlcmd supports Unix shell-style variables.

  • sqlcmd command has a .set command that displays and controls sqlcmd settings.

  • sqlcmd provides a standard interface that works the same no matter what database you’re using.

  • sqlcmd uses the enhanced database drivers in the Grizzled API’s db module. (Those drivers are, in turn, built on top of standard Python DB API drivers like psycopg2 and MySQLdb.)

  • sqlcmd is written entirely in Python, which makes it very portable (though the database drivers are often written in C and may not be available on all platforms).

In short, sqlcmd is a SQL command tool that attempts to provide the same interface for all supported databases and across all platforms.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sqlcmd-0.7.1.zip (60.9 kB view details)

Uploaded Source

File details

Details for the file sqlcmd-0.7.1.zip.

File metadata

  • Download URL: sqlcmd-0.7.1.zip
  • Upload date:
  • Size: 60.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for sqlcmd-0.7.1.zip
Algorithm Hash digest
SHA256 c58c620bba462f150718053873f751060ab2f782a90052c382821c3eb0c4fc7b
MD5 3927a5de63335d0b88a1dba658008b46
BLAKE2b-256 d7600b59ad68e360a78ff80807cb57072fbb01a3139bc974477aa42790f690fe

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page