Best T-SQL Ever! (The T-SQL Mandelbrot)


This is just pure awesome, from a geek standpoint. Thanks to The Daily WTF and Graeme Job for sharing this wonderful little jewel of code and making my day just a bit more interesting. 😉

Here’s the quote from The Daily WTF:

“So I was bored at work one day,” Graeme Job explains, “and wondered, what’s the most useless thing I could do with my time without actually doing anything. Then it hit me. I could use T-SQL to generate… Mandelbrot.”

Graeme continued, “Following is a single T-SQL SELECT statement that generates a text-representation of a Mandelbrot Set. The results are best viewed in text-mode.”

You can grab the code from The Daily WTF, and run it via SQL Server Management Studio. Of course, I tried it myself, and got this result:

2008-11-20_113348

(via http://thedailywtf.com/Articles/Stupid-Coding-Tricks-The-TSQL-Madlebrot.aspx)

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s