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: 2130

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

Suntec’s Data Mining Services Help You Get Efficient Data

It is a well- established fact that the availability of accurate and updated data is the base of undertaking successful business operations. Data is required at all point of business operations ranging from buying of goods and services from suppliers to marketing your final product. Often, business organizations fail to utilize their data to its full potential.

At SunTec, our…


Posted by Alvaro Dee on May 26, 2017 at 3:46am

Convert Prospects into Repeat Customers with Amazon Data Entry Services

eCommerce store owners get a better exposure for their products by selling on a platform like Amazon. If you are thinking about selling on Amazon or you are already a seller who needs help in managing product listings on this popular online marketplace, stop worrying. Professionals with sound technical knowledge of Amazon product listings, categorization, content, etc. are there to make things easier for you.

You can outsource …


Posted by Alvaro Dee on April 12, 2017 at 10:05pm

Increase Sales with Unique and Compelling Product Descriptions

Are you thinking about opening an online store? Or, do you already have one? Whether you have a small online business or a big store, the manner in which you list your products leads to a dramatic impact on your sales.

Don’t just sell a product, you need to sell an experience.
You yourself get excited about the features and specifications of your products. But the problem is that your…


Posted by Alvaro Dee on April 10, 2017 at 11:18pm

Business Research Helps You Understand Critical Traits of Your Business

Business organization needs strong customer and actionable industry insights to develop better understanding of its market and other important aspects. It can meet business objectives and make tactical, strategic and operational decisions with the help of business research services. The growth of a company largely depends on effective business research. You can conduct a successful market research with…


Posted by Alvaro Dee on April 3, 2017 at 3:23am

© 2017   Created by Steve Karam.   Powered by

Badges  |  Report an Issue  |  Terms of Service