I thought the same thing at the time haha. Though, SQL is really quite powerful, and it's best to make use of it's own operations rather than programming around it.Hee, that amused me because I'm in a databases class right now and have been like, uh, one am I going to use this? Which is irrational, because I fight with my limited knowledge of SQL at my internship. A lot. Though we use it slightly differently.
For example: I have a database with three tables that have the same column name (URLName). I wanted to ensure that when I added or updated one row's URLName column in any table that it was unique to all three tables. I could have done three SELECT queries and then three counts of the returned rows to ensure that no other table had that URLName, which would have added maybe 18 lines of bulk to the script.
What I actually did was just write a subquery that used a union to combine all three tables, and then just ensured that the URLName wasn't in that result. Much faster, and cleaner! Though, it probably took me 30 minutes to remember the union and write a query that worked. Which didn't save me actual programming time, and in fact increased the time, but it's faster (by milliseconds!) in script execution.