A Hello world on syntax highlighting in a post.

October 23, 2008

We recently reviewed recursive SQL and I wrote a query which will return the numbers in the Fibonacci sequence which are less than 100. (This is for DB2)

With FIBONACCI (FRST, SCND) AS

(SELECT 1, 1 FROM SYSIBM.SYSDUMMY1

 UNION ALL 

 SELECT SCND, FRST + SCND 

 FROM FIBONACCI

 WHERE SCND < 100  )   SELECT FRST FROM FIBONACCI; [/sourcecode] The source code here was placed in here using a shortcode as pointed out here.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

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

%d bloggers like this: