Types that tell the truth
Step 1 of 120%
Concept · step 1 of 12
The types you will use most
Every column has a type, and the type is the first rule the column keeps. Most tables need only a handful of them.
TEXTfor words of any length, andINTorBIGINTfor whole numbers.BOOLEANfor yes or no. true or false.DATEfor a day of the calendar, with no time of day.
CREATE TABLE members (
name TEXT,
age INT,
active BOOLEAN,
joined DATE
);Those four cover most columns. Two kinds of value need more care, and they are the rest of this lesson: money, where the obvious type loses cents, and moments in time, where the obvious type loses the time zone.
PostgreSQL docs: Numeric types ↗Starting a real database in your browser
It is called PostgreSQL. The first time it downloads about 5 MB; after that it is kept, and starts faster.
PostgreSQL running in your browser