---
title: "column"
description: "A column represents a single field or attribute in a database table or DataFrame that contains values of the same data type."
canonical: "https://motherduck.com/glossary/column/"
related:
  - title: "Why Use DuckDB for Analytics?"
    url: "https://motherduck.com/blog/six-reasons-duckdb-slaps/"
  - title: "list_columns | MotherDuck Docs"
    url: "https://motherduck.com/docs/sql-reference/mcp/list-columns/"
  - title: "Enum data type | MotherDuck Docs"
    url: "https://motherduck.com/docs/sql-reference/duckdb-sql-reference/enum/"
---

# column

> A column represents a single field or attribute in a database table or DataFrame that contains values of the same data type.

## Definition
A column represents a single field or attribute in a database table or [DataFrame](https://motherduck.com/glossary/dataframe/) that contains values of the same data type. Think of it like a vertical slice in a spreadsheet — every value in that slice represents the same kind of information, like names, dates, or numbers. In a customer database, for example, columns might include `first_name`, `email`, and `signup_date`. Each row is a record; each column is one attribute of every record.

<glossary-callout guide="duckdb-cheatsheet-full" />

## Working with Columns in DuckDB
DuckDB provides powerful ways to work with columns through SQL. You can select specific columns:

`SELECT first_name, email FROM customers`

Or use wildcards with exclusions:

`SELECT * EXCLUDE (password, api_key) FROM users`

DuckDB also offers unique column operations not found in most databases, like selecting columns by pattern:

`SELECT COLUMNS('order_*') FROM sales`

Or applying functions across multiple columns:

`SELECT MIN(COLUMNS(*)) FROM metrics`

## Data Types
Each column must have a consistent data type — for example, a date column can't contain arbitrary text strings. DuckDB supports standard SQL types like `INTEGER`, `VARCHAR`, and `TIMESTAMP`, but also modern types like `JSON`, `MAP`, and `STRUCT` for more complex data structures.

## Best Practices
Column names should be descriptive and follow a consistent naming convention. While DuckDB is case-insensitive for column names, it's good practice to use lowercase with underscores (snake_case) for readability. Column names should avoid spaces or special characters, though DuckDB allows you to use them if you wrap the name in double quotes.

## Related column concepts
The term "column" describes the logical field. Two closely related ideas are worth distinguishing:

- **[Columnar storage](https://motherduck.com/glossary/columnar-storage/)** is the physical layout that stores each column's values together on disk. It is what makes analytical (OLAP) engines like DuckDB fast at scanning and aggregating a few columns across many rows — a different concept from the column itself.
- **[Generated columns](https://motherduck.com/glossary/generated-column/)** are columns whose values are computed automatically from an expression over other columns, rather than being inserted directly.