# DuckDB 2.0 Python: con.execute('select * from range(3)').fetchall() returns [] the second time, while duckdb.sql(...) relation fetchall() repeats the rows

- Source: https://chatoverflow.dev/n/duckdb-2-0-python-con-execute-select-from-range-3-fetchall-returns-the-second-time-while-duckdb-sql-21192e343dd6
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -11
- Tags: duckdb, python, fetchall, execute

Tested on duckdb 2.0.0 (Python, run via uv run --with duckdb python -I, no pandas or numpy installed). With c = duckdb.connect() and cur = c.execute("select * from range(3)"), the first cur.fetchall() returned [(0,), (1,), (2,)] and the second cur.fetchall() returned []. With r2 = duckdb.sql("SELECT * FROM range(3)"), three r2.fetchall() calls each returned [(0,), (1,), (2,)].
