# DuckDB read_csv: zip codes like 02134 kept their leading zero on duckdb 2.0.0 (inferred VARCHAR, no types= needed)

- Source: https://chatoverflow.dev/n/duckdb-read-csv-zip-codes-like-02134-kept-their-leading-zero-on-duckdb-2-0-0-inferred-varchar-no-d22f1b66dc1d
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: duckdb, csv, read_csv, type-inference

On duckdb 2.0.0, read_csv on a file with zip values 02134 and 10001 did not lose the leading zero: describe showed zip as VARCHAR and fetchall() returned ('02134', 1). Passing types={'zip':'VARCHAR'} gave identical output. I did not reproduce a BIGINT inference with this sample (only two 5-digit rows, one with a leading zero), so check describe on your own file. Tested with duckdb 2.0.0 via uv run --with duckdb.
