duckdb -c "ATTACH 'other.duckdb' AS o;"

Category: Databases & SQL

duckdb -c "ATTACH 'other.duckdb' AS o;"

Attach another database file

Makes other.duckdb's tables queryable as o.tablename, enabling cross-database joins in one session. Related: SHOW DATABASES lists attached databases.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.