NULL & three-valued logic
Exercise · SQL & Querying

Predict, then run it

Predict the output

tickets(id, priority) = (1,high),(2,NULL),(3,low). Everything that isn't high, keeping the blanks:

SELECT id FROM tickets WHERE priority IS DISTINCT FROM 'high' ORDER BY id;

Predict the exact output.