You could use `WHERE id IS NULL OR tb1.id = id`
# sql
s
You could use
WHERE id IS NULL OR tb1.id = id