Thursday, February 05, 2009

A SQL Joke

I don't think I've seen one before.  An actual "joke" about SQL

A SQL query walks into a bar and sees two tables. He walks up to them and says 'Can I join you?'

It is about as funny as most of my jokes.  All the more funny to me since I just (as in a couple of minutes ago) wrote:

Joins are what RDBMS's do for a living.

Anyway - you can hit this link to see if it gets any comments...



Blogger Eddie Awad said....

You might also like these programmer jokes.

Thu Feb 05, 10:42:00 PM EST  

Anonymous Anonymous said....

And most men...he performed a Rollback and never Commited...

Fri Feb 06, 03:38:00 AM EST  

Anonymous Anonymous said....

He picked those two tables after performing a full scan of the other tables in the room.

Fri Feb 06, 03:40:00 AM EST  

Blogger Asif Momen said....

A Good one.

Fri Feb 06, 05:25:00 AM EST  

Blogger Sidhu said....

This comment has been removed by the author.

Fri Feb 06, 09:41:00 AM EST  

Blogger Sidhu said....

hahaha...good one...

Fri Feb 06, 09:42:00 AM EST  

Blogger HunterX said....

That's a great!

Fri Feb 06, 10:27:00 AM EST  

Blogger Teko said....

This is hilarious joke Tom,

However, you may want to put a footnote for those readers that are not familiar with SQL.

Something like:

1) If you have hard time understanding the joke, please refer to Oracle SQL Reference Manual


Fri Feb 06, 11:03:00 AM EST  

Blogger Dave Edwards said....

It sure is a lot to take in, isn’t it? Here’s a little something from Tom Kyte to lighten the load of every DBA, an SQL Joke: “A SQL query walks into a bar . . . ” It’s Tom’s punchline—click through!

Log Buffer #134

Fri Feb 06, 03:56:00 PM EST  

Anonymous Anonymous said....

Maybe ut should start with "Hi this is xxx from India your new Oracle sales representative and I am anxious to talk with you about any new projects your company is working on this quarter ..."?

Sat Feb 07, 07:07:00 PM EST  

Blogger Thomas Kyte said....


no idea what witty observation you are trying to convey...

Sun Feb 08, 01:38:00 PM EST  

Anonymous Iru said....

For Anonymous " like every other men..."
Sorry but it doesnt work for everybody: in Spanish, "a table" is "una tabla" --> Female

Mon Feb 09, 04:13:00 AM EST  

Anonymous Bryan said....


With all your posts about SQL injection, I was sure you would have seen this cartoon about Little Bobbie Tables:

Mon Feb 09, 09:09:00 AM EST  

Blogger Hosh said....

now this website amuses me every so often.

Also nothing to do with computer programming jokes, yet i still love the following site.
For some reason this one makes me laugh every time. even after I've seen it for the 10th time.

Mon Feb 09, 05:39:00 PM EST  

Anonymous Anonymous said....

Written on office toilet door



Wed Feb 11, 06:33:00 AM EST  

Blogger Smitty said....

To add tot he joke...

Then the waitress walks up and says "Nice view!"

Thu Feb 12, 02:25:00 PM EST  

Anonymous Sally said....

I am bemused/amused by the number of men commenting on the technical accuracy of the comments being made regarding the joke; or about how they could have written it better. Sql programmers are as bad as plumbers : "I don't know who did this for you love but they should have done it like this instead" - sql testosterone! LMAO

Sat Feb 14, 06:16:00 PM EST  

Anonymous Anonymous said....

A SQL query walks into a bar on Valentine's day, and sees two tables. She says "insert all this, you cartesian pigs!"

Sun Feb 15, 02:17:00 PM EST  

Anonymous Anonymous said....

An Englishman (Jonathan Lewis), an American (Don Burleson) and an Australian (Howard Rogers) were sitting in bath.

What a wonderful example of cross-ideological harmony!

Wed Feb 18, 05:24:00 AM EST  

Blogger dsmg said....

Just a question. Shouldn't it be an SQL joke, not a SQL joke, as in sending out an SOS (famous Police song) not a SOS? Sorry to be pedantic but I revise the English of many Spanish University professors and I always tell them an SQL and was interested to see that you put a SQL. Thanks Danny

Mon Feb 23, 02:25:00 AM EST  

Blogger Thomas Kyte said....

@Dmsg -

SQL is generally spoken and read to mean "sequel" - not an acronym S-Q-L, but read as a word sequel

An sequel Joke - not right.
A sequel Joke - right.

An S.Q.L. Joke - right

So, it depends on whether you are in the "sequel" camp (like I am) or the S.Q.L. camp...

A SQL Joke is the way I'll be sticking with.

Mon Feb 23, 02:31:00 AM EST  

Blogger Brian Tkatch said....


The documentation <URL:> states "SEQUEL later became SQL (still pronounced "sequel")."

Mon Feb 23, 09:20:00 AM EST  

Anonymous Anonymous said....

Funny, I always pronounce it "squeal"...

Wed Mar 04, 10:39:00 AM EST  

Anonymous Rob said....

Thanks Tom. I liked this and hope you don't mind I tweeted about it. By the way, are you on twitter?

Tue Mar 17, 03:55:00 PM EDT  

Blogger Thomas Kyte said....

@Rob -

twitter - highly unlikely :)

Tue Mar 17, 04:26:00 PM EDT  

Anonymous Anonymous said....

SQL> alter package god compile;
alter package god compile
ERROR at line 1:
ORA-04043: object GOD does not exist

Oracle - knows everything!

Tue Mar 31, 08:18:00 AM EDT  

Anonymous Anonymous said....

And later, when a Developer created a Package "God" and it got compiled, Deep Withing, Oracle still knows this God was "Man Made" to serve some application (or religion may be).

Fri Apr 24, 05:51:00 AM EDT  

Blogger Smitty said....


Pretty bad, you can slam God but cannot fess up to who you are.

Fri Apr 24, 09:13:00 AM EDT  

Anonymous bugnvl said....


select t.*, t.rowid from a t
inserted 3 rows

NEXT sysdate + 2/1440 as select * from a;

select * from b;
all 3 are coming

inserted 1 row in a table.
it is getting reflected in b ( Mview)
show parameter query_rewrite_enabled boolean FALSE
show parameter query_rewrite_integrity string ENFORCED

Still it works in one environment and not in other

Wed May 06, 09:15:00 AM EDT  

Blogger Larry Klein said....

When I was first taught that a lot of Oracle tuning was about finding and fixing bad SQL, I asked, "Oh, do you mean like the movie Rocky IV?"

Wed Jun 17, 09:09:00 AM EDT  

Blogger Dan Pretselman said....

Nice one.

Tue Jul 28, 07:52:00 AM EDT  

Blogger mathan said....

Great sql jokes....enjoyed....I have never thought all those statements are that meaningfull !!!!!!!

Fri Jan 15, 03:36:00 AM EST  

Blogger Kjetil said....

Q: Why do you never ask SQL people to help you move your furniture?
A: They sometimes drops the table

Wed May 05, 03:21:00 AM EDT  

Blogger Thomas Kyte said....


very funny :)

Wed May 05, 08:25:00 AM EDT  

Anonymous Anonymous said....

The Query was soon surrounded by subQueries - it was then he realized he had walked into an Array Bar.

Sat Jun 05, 09:13:00 AM EDT  

Blogger Aaronmark said....

It's really COOL!!
Thank you so much!!!

Sat Mar 05, 01:06:00 AM EST  

Blogger Vish said....

I can forecast future coz I'm Oracle he he he :))

Sat Apr 23, 04:17:00 AM EDT  


<< Home