SQL CASE: Know and Avoid 3 Lesser-Known Hassles

Total: 3 Average: 5

SQL CASE? Piece of cake!


Not until you bump into 3 troublesome issues that can cause runtime errors and slow performance.

If you are trying to scan the subheadings to see what the issues are, I can’t blame you. Readers, including me, are impatient.

I trust that you already know the basics of SQL CASE, so, I won’t bore you with long introductions. Let’s dig into a deeper understanding of what’s happening under the hood.

Read More

SQL FOREIGN KEY: The Ultimate, Easy Guide for Newbies

Total: 1 Average: 5

Newbie? Then an SQL foreign key may be foreign to you.

You may have heard different opinions about SQL foreign keys. If you haven’t, soon you will. Or your experience will affect your view. The main thing to know is, foreign keys are a must in relational databases.

Yet, some developers may remove or ignore foreign keys when facing some complications. So, what to do? To use the foreign key or not to use it? Will there be times when you won’t need to use them?

This guide is for you to see how important this thing is. You will also know some gotchas in code and learn how to fix them. Besides, of course, we’ll use practical examples. There’s nothing you can’t handle.

Read More

5 No-Hassle Tips to Run SQL UPDATE with JOIN

Total: 1 Average: 5

“Oops! My bad.” How many times did you say this after an SQL UPDATE had gone wrong? The thing is, if you aren’t careful, a table update can have serious consequences in the form of the DELETE statement. It could become even worse if you complicate it by using UPDATE with JOIN. That’s why you need to think it over before hitting Execute or pressing CTRL-E.

So, today you will learn how to code your SQL UPDATE with JOIN without hassles and never say “Oops! My bad” again.

Read More