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

(19)

You rated this post out of 5. Change rating

2016-09-02 (first published: )

5,483 reads

Blogs

AI in SQL Server vs PostgreSQL: Vector Search, Embeddings, and RAG Compared

By

Both SQL Server and PostgreSQL are moving fast into AI territory — and if...

Monday Monitor Tips: AI Alert Analysis

By

We keep adding new AI capabilities to Redgate Monitor, where it makes sense. Check...

From SQL Saturday to Day of Data

By

A behind-the-scenes look at Day of Data Jacksonville 2026, the transition from SQL Saturday,...

Read the latest Blogs

Forums

Install SQL Scripts via GUI Wizard

By Jörg

Hallo all! My problem is this: I have quite a bunch of TSQL scripts...

Converting Money

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Converting Money

non ascii columns in a utf-8 .txt file

By stan

hi, we couldnt get our upstream data source developers to supply what is sometimes...

Visit the forum

Question of the Day

Converting Money

Does this run successfully on a SQL Server 2022, US English default installation?

DECLARE @YenAmount MONEY;
SET @YenAmount = ¥1500; 

SELECT @YenAmount AS RawValue;

See possible answers