SQLCOALESCENULLtutorial

What is COALESCE in SQL? Handling NULL for beginners

COALESCE returns the first non-NULL value from a list. Plain words: defaults for missing data, fallback chains (nickname → name → 'Guest'), safe arithmetic, and pairing with NULLIF. With tables and common pitfalls.

1 λεπτά ανάγνωσηςSQL · COALESCE · NULL · tutorial

COALESCE returns the first non-NULL value from a list of arguments. Essentially a fallback chain: if the first is NULL, take the second; if that's NULL too, the third; and so on.

This article is currently in Russian. The full English translation is on the way.

Εξασκηθείτε σε πραγματικές ασκήσεις

Λύστε ασκήσεις στην εξάσκηση SQL με άμεση βαθμολόγηση και υποδείξεις.

Άνοιγμα εξάσκησης