skip to today's puzzle
SQL Sip

Boolean columns hold TRUE or FALSE

Some columns hold a plain yes or no — has_library_card, is_active. SQL calls this a boolean column, which means its value is TRUE or FALSE (or NULL if unknown). You compare it to TRUE or FALSE directly, with no quotes, because it isn't text. SQL Server has no TRUE keyword; it stores yes/no as a BIT column holding 1 or 0.

A tiny example

In plain English: Show me the names of the students who have a library card.

SELECT name
FROM students
WHERE has_library_card = TRUE;

What comes back

name
Ava
Noah

Ava and Noah are the only students whose has_library_card is TRUE.

Related SQL lessons

Ready for a break?

Take on today's cozy puzzle. A fresh, bite-sized query waits every morning — no timers, no pressure.

play today's sip