Scripts

Technical Article

Stupid Coding Tricks: The T-SQL Mandelbrot

The bar for entry into CodeSOD is pretty straight forward: professionally-developed code that elicits that certain What The— reaction. Though there have been a few exceptions over the years, generally speaking, student code, hobbyist code, and amateur code need not apply. That said, I'd like to try something a little different today. Today's example is not technically professionally-developed, it's a Stupid Coding Trick.

"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."

4.16 (19)

You rated this post out of 5. Change rating

2016-09-02 (first published: )

5,472 reads

Blogs

Export a Power BI Report that cannot be Downloaded

By

Yes, you’re reading that right, we’re going to download a report that cannot be...

Query Intelligence in SQL Server 2025: What Developers Need to Know

By

When Microsoft announced SQL Server 2025, I was curious about what would truly change...

Finding and Killing Blockers with Redgate AI Tech

By

Redgate has a research arm, called the Foundry, that has been experimenting with AIs...

Read the latest Blogs

Forums

Poor Name Choice

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Poor Name Choice

Getting the Indexed Columns

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Getting the Indexed Columns

T-SQL in SQL Server 2025: Substring Changes

By Steve Jones - SSC Editor

Comments posted to this topic are about the item T-SQL in SQL Server 2025:...

Visit the forum

Question of the Day

Getting the Indexed Columns

I run this code on SQL Server 2022 to get a list of all the indexes and their key columns. What is returned?

SELECT   
    INDEX_COL (N'AdventureWorks2017.Sales.SalesOrderDetail')

See possible answers