Announcing our $3.4M seed round 🚀 Read more →

How to Add a Default Value to a Column in PostgreSQL

-- Example: Orders have a default total of 0 cents
alter table orders alter column total_cents set default 0;

-- Example: Items are available by default
alter table items alter column available set default true;

Ready for a modern SQL editor?