NULL, coalecse.md 864 B

NULL - отсутствие значения

-- Для извлечения полей со значением NULL нужно использовать `is`
select * from author_without_checks where description is null;

-- coaleasce вместо null вернет 'не заполнено'
select
	author_id,
	name,
	coalesce(description, 'не заполнено') as description
from author_without_checks;

update author_without_checks set description='привет' where author_id=3;
-- В задании с базой птиц
select 
	family_id, 
	family_name, 
	coalesce(description, 'не заполнено') description 
from family;

-- Все поля где description null
select * from family where description is null;

-- С условием or
select * from family where description is null or family_name like '%Д%';