Silent Mistakes
No error, wrong answer.
Errors are actually the friendly mistakes. They stop you, and tell you what's wrong. The dangerous mistakes are the silent ones. The query runs, and gives you an answer. It's just the wrong answer.

- Errors are friendly
- Silent mistakes are dangerous
- Runs fine, wrong answer
The missing comma
Can you spot the problem? There's no comma between title and price. Run it. No error. But we only got one column, and it's called price. Without the comma, SQL thought price was an alias for title.
SELECT title price
FROM books
LIMIT 3;โโโโโโโโโโโโโโโโโโโโโโ โ price โ โโโโโโโโโโโโโโโโโโโโโโค โ The Silent Orchard โ โ Code of the River โ โ Stars Over Lagos โ โโโโโโโโโโโโโโโโโโโโโโ
The wrong case
We're looking for fantasy books, but typed fantasy with a small f. Run it. Nothing. No error, just an empty result. Text comparisons are case sensitive, and the genre is stored as fantasy with a capital F.
SELECT title
FROM books
WHERE genre = 'fantasy';The fix
One safe fix is to lower both sides. Then it doesn't matter how the data was typed. Run it. Three fantasy books.
SELECT title
FROM books
WHERE LOWER(genre) = 'fantasy';โโโโโโโโโโโโโโโโโโโโโโโโ โ title โ โโโโโโโโโโโโโโโโโโโโโโโโค โ Dragons of Ember Bay โ โ Crown of Ash โ โ The Glass Forest โ โโโโโโโโโโโโโโโโโโโโโโโโ
How to catch silent mistakes
So how do you catch mistakes that don't announce themselves? Look at the column names in the result. Check row counts against what you expect. Test with a value you know. And if a result is empty, or seems too good, be suspicious.
Summary
Silent mistakes don't stop you, so you have to catch them yourself. Check names, counts, and known values. Next, turning rows into a neat summary table.
Key takeaways- Missing comma = alias
- Text is case sensitive
- Check every result