Re:Ask HN: Why do you hate SQL?
by pjungwir on Thursday July 11, 2013 @11:15AM
(#6026524)
I love SQL, but I'll admit it felt strange when I first learned it. Its non-imperative nature makes it really different than most programming work. It's also harder to break down into units, so you almost need the whole query to spring from your head at once, unlike in a programming language where you can write one line at a time. It takes a little while to adapt to thinking in SQL concepts.
Perhaps another reason is that SQL formatting style is less unified, and stringing the whole query onto one line is a mess. Here is how I like to write it:
SELECT emp.name
FROM employees emp
WHERE emp.department_id = 5
;
Perhaps another reason is that SQL formatting style is less unified, and stringing the whole query onto one line is a mess. Here is how I like to write it: