Using SQLFiddle

2

March 3, 2014 by Kenneth Fisher

SQL Fiddle is a free website that you can use to demonstrate and save a query example in any one of 13 different DMBSs (as of this posting) including two different versions of SQL Server (2008 & 2012).

www.sqlfiddle.com

SQLFiddle1

First you set up your work environment and “Build Schema”.

SQLFiddle2

Then you can put in your query, run it, and see the output and even the execution plan.

SQLFiddle3

At this point you can copy the link (for example the above at http://www.sqlfiddle.com/#!6/dbd09/1) and share it with others who can see it. You will see a lot of this on dba.stackexchange.com as it’s a great way to display a problem.
It’s also a good way to share demonstrations. I’m not sure I would want to us it to demo a stress test though ;).

2 thoughts on “Using SQLFiddle

  1. David Bandel says:

    Unfortunately this doesn’t work anymore.

    I even tried entering the example you have here in your image, typing it all out by hand, since the link to the example doesn’t work nor does, in the Fiddle itself, ‘View Sample Fiddle’

    I get a ‘Create script error’ when trying to Build Schema.

    The GO keyword was red as well.

    • I was actually able to get it to come up (and I did fix my one broken link) but it is horrendously slow.

      When you got the create script error did you make sure that you had switched from MySQL (the default) to SQL Server?

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 6,758 other subscribers

Follow me on Twitter

Archives

ToadWorld Pro of the Month November 2013