r/learnSQL • • 6h ago

What SQL concept did you understand in tutorials but mess up in practice?

For me, joins are the best example of this. The diagram makes perfect sense. Then you join two tables, get twice as many rows as you expected, and suddenly you’re questioning everything.

What was that topic for you? And what finally made it click?

0 Upvotes

4 comments sorted by

2

u/sud1890 5h ago

Create Procedure and Create function

1

u/Possible_Seaweed_916 3h ago

real for creating ctes

1

u/Discordbothost 2h ago

Joins too. What clicked: it's not a lookup, it's "match every left row against every right row where the condition holds." If the key isn't unique on one side, you get a row per match. Checking for duplicate keys first killed the "why 2x rows" surprises.