- Esecutori
-
Impara
Impara Python Esempi eseguibili, NumPy, pandas e altro Impara l'IA / Machine LearningReti neurali, ML e LLM da zero Impara C e C++ Puntatori, memoria, STL e C++ moderno Impara C#Fondamenti, OOP, LINQ, async ed esercizi .NET Impara MatplotlibGrafici a linee, barre, dispersione e torta con visualizzatori Impara RustOwnership, trait, gestione degli errori e thread Impara GoSlice, interfacce, goroutine e canali Algoritmi Python Ricerca, ordinamento, ricorsione e visualizzazioni O(n) Algoritmi C e C++ Confronta le implementazioni in C e C++ Programmazione per bambini Impara a programmare giocando!
- QuizNuovo
- SfideNuovo
- Per docentiNuovo
- Aggiornamenti
- Offrimi un caffè
Quiz di SQL: NULL Values
NULL means "unknown" in SQL, and it behaves differently from any normal value. This quiz tests IS NULL, COALESCE, NULL in arithmetic and the NOT IN trap that silently returns nothing.
Domanda di esempio
Domanda 1 di 10What does this query return?
CREATE TABLE staff (name TEXT, manager TEXT, bonus INTEGER);
INSERT INTO staff VALUES ('Ana', NULL, 100), ('Ben', 'Ana', NULL), ('Cy', 'Ana', 50), ('Dee', NULL, NULL);
SELECT COUNT(*) FROM staff WHERE bonus = NULL;
Mostra la risposta
C. 0 Any comparison with NULL gives NULL (unknown), not true, and WHERE only keeps rows where the condition is true. So = NULL matches nothing; use IS NULL.
Cosa copre questo quiz
- Why
= NULLnever matches andIS NULLdoes - NULL in arithmetic and comparisons like
<> - Replacing missing values with
COALESCE - The
NOT INtrap when a list containsNULL - Where
NULLs go when sorting
Domande frequenti
Serve un account?
No. Chiunque può giocare. Accedi per salvare XP, serie, badge e cronologia.
Posso rifarlo?
Sì. Il tuo miglior punteggio resta salvato, e domande e risposte vengono mescolate ogni volta.