DuckDB 2 · From Python

Run a query

Run SQL and fetch the rows as Python tuples.

import duckdb

duckdb.sql("SELECT 42 AS answer").fetchall()

Official DuckDB 2 documentation

More from python commands

All from python commands · DuckDB 2 cheatsheet

Was this page helpful?