It was Chen Shapira's idea and here I am making it the official first ever Oracle community contest.

Read on to learn more about the obfuscated SQL code contest.

What does obfuscate mean?

To obfuscate means to make so confused or opaque as to be difficult to perceive or understand.

What are the goals of the contest?

  • To write the most Obscure/Obfuscated SQL query.
  • To show the importance of SQL programming style, in an ironic way.
  • To stress SQL techniques with unusual code.
  • To illustrate some of the subtleties of the SQL language.
  • To provide a safe forum for poor SQL code.

What are the rules of the contest?

  • Your entry must be one SQL script file.
  • The SQL script must contain only one SQL (SELECT) statement.
  • The SQL statement can be as short or as long as you want and may contain an unlimited number of subqueries or inline views.
  • You must provide the database version the script was tested on.
  • The SQL statement must be able to be executed by anyone with a connection to an Oracle database - with at least the same database version as indicated by the author.
  • If needed, the script may include test data or database object creation code required to make the SQL statement execute successfully.
  • The SQL script must be of original work.

Who is eligible to participate?

Any Oracle Community member is eligible to submit one entry.

How do I submit an entry?

Just upload the SQL script file with your reply below. Make sure the file's extension is either sql or txt. In addition to uploading the file, you may also include a link to your entry, if you have published it on your blog or web site.

What else?

April 1st 2008 is the last day you can participate in this contest and submit your entry. After that date, all eligible entries will be voted/commented on. The author of the most popular entry will be declared the winner.

Happy obfuscation and good luck!

Views: 2108

Replies are closed for this discussion.

Replies to This Discussion

The more industrial formatter on sqlinform was able to handle all the submitted SQL so far. What we need is a formatter that transforms a SQL into shapes, like Rob's question mark SQL.
yes, but some keywords like CONNECT BY and GROUP BY are not colored in sqlinform due to the total absence of spaces :-)
You're right! No wonder it's obfuscated :)
I reported to the sqlinform author that it does not recognize the keywords in

select.1ffrom dual

well, not related to my query ;)
I made my query non formattable :-)
During last month I have not got much free time, while participating in a new project.
Some time ago I started creating my "obfuscated" SQL, but it's still not over, and the deadline is tomorrow, so I put what I got.

the idea was to put an island and a turtle underneath :))
required version - any of 10g family
your query is amazing!
select regexp_replace('comprehensible','((.).*?)\2','\1') s from dual
Non-greedy regular expressions have been introduced in 10gR2
have forgotten that I used non-greedy search
correcto >=10.2.x.x
today is the last day so here is one extra query just for fun :-)

select y "&_DATE" from dual model return updated rows dimension by (999 x) measures (lpad('x',200) y, 0 z)
rules iterate (80)
y[for x from -10 to 10 increment 1] order by x=y[cv(x)]
||case when iteration_number<2 then 'X' when iteration_number<12 then
case when abs(cv(x))between 10-iteration_number and 11-iteration_number then 'X' else ' ' end
when -.1+sqrt(power(iteration_number/3-14,2)+power(cv(x),2)) between 8.5 and 10 then 'X'
when iteration_number=55 and cv(x)=-3 then 'O'
when iteration_number between 35 and 40 and cv(x)=3 then '/'
else ' '
order by x;
output in sqlplus
Thank you all for your very interesting entries. I will now close this thread. I have started another thread titled Results of the Obfuscated SQL Code Contest that summarizes your entries and gives the community a chance to vote. But, to me, you're all winners :)


Oracle Community On

I'm not a fan of advertising, and so I will not be including any advertisements on However, managing this community does not come without cost! If you are willing to donate to help pay for the monthly community fees and domain services I accept Bitcoin and PayPal donations.

Donate Bitcoins




Blog Posts

Augment the Speed and Efficiency of Website Development with Joomla

Over the past few years, Joomla has emerged out as one of the greatest platforms for designing, developing, and deploying websites and web applications worldwide. Joomla scales up extremely well, uses less memory and gives a brilliant performance. Hire skilled and experienced Joomla developers to use Joomla CMS for developing simple and complex corporate websites. You can even enhance the functioning of your existing website by using this open source platform.

By outsourcing Joomla…


Posted by Alvaro Dee on March 20, 2017 at 4:00am

Top 10 Interview Questions & Answers for Java Developers

An organization hiring a Java developer is looking for someone who can code the applications flawlessly. For the period after Java training, the following is a very important list of ten Java interview questions. Make sure you tap the benefits of this comprehensive list of questions shared by our Java counterparts to crack your next interview.

1. What is immutable…


Posted by Michael Warne on March 17, 2017 at 3:00am

Get the Best Website for Your Business in a Set Time Frame

If you sell products online, you must be knowing how time-consuming and mundane it is to upload products. There are chances of you looking for someone to handle your product data entry tasks. A company that has a wealth of experience and is known for providing its customers with data entry services for a variety of eCommerce solutions can deal efficiently with high volumes of work without any hassle.…


Posted by Alvaro Dee on March 17, 2017 at 2:47am

Sell More with Better Quality Product Images

In this dynamic business environment, a company that thinks strategically stays ahead of the competition. Every business having an online presence requires pictures of high quality for advertising its products and services. Companies have today understood that people always relate better to visual cues. Compelling pictures have the ability of making…


Posted by Alvaro Dee on March 14, 2017 at 11:46pm

© 2017   Created by Steve Karam.   Powered by

Badges  |  Report an Issue  |  Terms of Service