---
name: usql
description: "Use when the user wants to run ad-hoc SQL against a database from the shell - postgres, mysql, sqlite, mssql, oracle, snowflake, bigquery, redshift, cockroachdb, clickhouse, duckdb, and 20+ more drivers via one binary. Use the universal usql client instead of psql/mysql/sqlite CLIs for ad-hoc SQL."
---


# usql

## When to use

See [references/when-to-use.md](references/when-to-use.md). Load only when this section is needed.

## Invocation

See [references/invocation.md](references/invocation.md). Load only when this section is needed.

## Patterns

See [references/patterns.md](references/patterns.md). Load only when this section is needed.

## Anti-patterns

See [references/anti-patterns.md](references/anti-patterns.md). Load only when this section is needed.

## Cross-refs

See [references/cross-refs.md](references/cross-refs.md). Load only when this section is needed.
