duckdb_columns()

Query column metadata to inspect a table’s column names, declared types, and positions without scanning its rows.

Reference: Haybarn WASM 2.0.0-rc12

Arguments & returns

duckdb_columns()

Table
Overload link Returns
#01 TABLE

Inspect table column names and types

Query column metadata to inspect a table’s column names, declared types, and positions without scanning its rows.

Use column_index to preserve schema order. Filter the database, schema, and table to identify one object.

Inspect table column names and types
SQL
Haybarn WASM 2.0.0-rc12 · In your browser

Guide example · Run to view results.

Expected result
column_namedata_type
productVARCHAR
quantityINTEGER

Watch for: Alphabetical column order is not schema order. Include ORDER BY column_index when generating a schema listing.