duckdb -readonly mydb.duckdb 'SELECT 1;'

Category: Databases & SQL

duckdb -readonly mydb.duckdb 'SELECT 1;'

Open a database read-only

Prevents any writes to the file, which is safe for inspecting a database you should not modify. Related: opening normally allows writes.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.