DEFAULT

A column clause giving the value the database stores when an insert does not supply one.

In more detail

stock INTEGER NOT NULL DEFAULT 0 means a new product starts with an honest zero rather than a missing value. PostgreSQL defaults can also be expressions, such as today's date.

Related terms

Taught in

References