A column is a named field in a relational table. It represents one attribute of the table’s entity, such as a product’s name, price, or manufacturer. Every column has a data type that describes the kind of value it stores. section 1.3 section 1.10
When defining a column, decide:
- What the column is called, such as name, price, or product_id. section 1.10
- Which data type fits its values: INT for integers, TEXT for strings, or DECIMAL for numeric values with controlled precision. section 1.10
- Whether the column permits NULL, which represents a missing or unknown value. section 1.10
- Whether it identifies rows uniquely, as product_id does when defined as a primary key. section 1.3
Product columns
A product table can define product_id as INT PRIMARY KEY, name and description as TEXT, price as DECIMAL(5, 2), and manufacturer as TEXT. Each product occupies one row; these columns describe that product. section 1.10 section 1.3
CREATE TABLE product ( product_id INT PRIMARY KEY, name TEXT NOT NULL, description TEXT NOT NULL, price DECIMAL(5, 2) NOT NULL, manufacturer TEXT NOT NULL );
Use this CREATE TABLE example to see column names, data types, and a primary-key constraint together. section 1.10
Columns can change as a design evolves. ALTER TABLE can add a column or modify a column’s data type, while dropping the table removes all its columns and data permanently. section 1.11








