[ Jocelyn Ireson-Paine's Home Page | Publications | Dobbs Code Talk Index | Dobbs Blog Version ]

SQL Jokes

An SQL query went into a bar. He walked up to two tables and said, "Hi, can I join you?"

That joke was posted to the Microsoft Excel Developers' List EXCEL-L by Jeff Hutchinson. I wondered what other jokes were out there, and started Googling. And that made me think that database work is so easy that developers must have huge amounts of spare time. Because as soon as I'd typed "sql jok", Google completed it with "sql jokes", "sql joker", "funny sql jokes", "bad sql jokes", "sql joker characters", "sql jokes select", "sql joker sign", "sql joke of the day", and "sql jokes query". Clearly, there are lots of developers diverting themselves by putting jokes onto the Web, and — since there's no supply without demand — lots of other developers diverting themselves by reading them. Oh, and there was also "sql jokes database". A database that tells you, one might say, all the jokes that meta.

XKCD comics had a nice cartoon about the dangers of unescaped input, which I found on AskSQL's Which is the best SQL joke? Don't admit little Bobby Tables to your school. Here are two more, not cartoons this time. By Rob Farley:

Q: What do you call someone who turns into Father Christmas whenever there's a full moon?
A: A were-clause

And from Jeremy H:

An Oracle DBA and a DB2 DBA walk into a bar. The barman asks them what they'd like to drink and a huge debate ensues on how to optimise the query. (Boom Tish)

Their mate the SQL Server DBA rolls in after about 15 minutes only to find them still arguing. After rolling his eyes at them, he walks up to the bar and greets the barman warmly. The barman asks him "Hey, you're a DBA too aren't you? Why aren't you joining in?" The SQL Server DBA grins at the barman and says "Ah... well... the reason I'm late is that this always happens when these clowns go out drinking — I work with SQL Server, so I had the option of optimising the query using a wizard before I got here! So mine's a scotch!"

But in fact, I didn't find many SQL jokes. There were, though, quite a few about programmers, database administrators, and contractors. Here's a contractor joke, posted by Phil Factor:

An IT contractor goes to the gates of Heaven. Very indignantly, he says to St Peter, "Look here, I was only 45 so why did I have to die? It's not fair." St Peter stares back with a puzzled frown, and leafs through the golden book. "Hey, that's odd. According to the hours you've claimed for, you're 120."