News for hackers. Stuff that matters.
Re:SQL Fiddle by Animus7 on Wednesday February 01, 2012 @02:26PM (#3539475)
I played with this for a couple of minutes to see where the boundaries were, and I've gotten 'database already exists', 'internal server error', Apache alerts, random hangs and disconnects, and 'command terminated by administrator'.

It's a neat concept, but it needs serious polishing before I'd consider going to this even for quick and dirty testing or demo purposes.

Re:SQL Fiddle by jfeasel on Wednesday February 01, 2012 @03:38PM (#3539805)
Thanks for taking a look at it; sorry you found some bugs. I should point out that I only posted it publicly a week ago, and this has been my first traffic spike (thanks YCombinator!). I actually only started working on it less than three weeks ago, so I'm not surprised some boundary cases cause trouble. I've got more plans for it in the future. One thing I should note - a lot of people are working against the sample fiddles, but those are probably not where most people will be doing actual fiddling with their own queries, when they use the site for real. Different schema definitions are completely isolated (with little traffic), and so shouldn't see the sorts of problems you stumbled on.
Re:SQL Fiddle by jeremya on Wednesday February 01, 2012 @04:24PM (#3540022)
Your creation is very cool, kudos. I don't mean to be pedantic, but I think you mean "thanks Hacker News." The people behind YCombinator are certainly responsible for this website, but they are two different things.
Re:SQL Fiddle by jfeasel on Wednesday February 01, 2012 @04:30PM (#3540056)
@jeremya - sorry for the misattribution. I just signed up for an account here, so I didn't know the lay of the land.

/newb

Re:SQL Fiddle by padobson on Wednesday February 01, 2012 @03:11PM (#3539664)
The first thing I did was check to see if I could test a mongo query...

...and then I remembered I'm an idiot.

Re:SQL Fiddle by WesleyJohnson on Wednesday February 01, 2012 @01:45PM (#3539311)
I could see myself using this when I'm killing time answering questions on Stack Overflow and don't want to launch SQL Management Studio to test out my answers, or if I'm on a machine where it's not available. I was pleased to see it supports the declare table variables in MSSQL. Are there limitations on commands, etc?
Re:SQL Fiddle by jfeasel on Wednesday February 01, 2012 @03:45PM (#3539836)
I don't allow stored procedures or other programming (custom functions, triggers, etc...), because I worry about the danger of opening up that to the whole world. It should be pretty much open for any other standard database+sql commands you would need to do.

BTW - I basically built this site to facilitate answering SQL questions on Stack Overflow. Here's my SO profile: http://stackoverflow.com/users/808921/jake-feasel

Re:SQL Fiddle by bwarp on Wednesday February 01, 2012 @04:47PM (#3540151)
Damn (but jolly well done anyway).

MSSQL: The EXECUTE permission was denied on the object 'xp_cmdshell', database 'mssqlsystemresource', schema 'sys'.: exec xp_cmdshell

MySQL: Access denied for user 'user_46783'@'localhost' (using password: YES): load data infile '/etc/passwd' into table leet;

Re:SQL Fiddle by jfeasel on Wednesday February 01, 2012 @04:49PM (#3540160)
LOL yeah, I tried to do some of the more obvious security limitations to prevent just that sort of thing.
Re:SQL Fiddle by bdg on Wednesday February 01, 2012 @02:36PM (#3539517)
You sir, if you make this shine as well as jsfiddle, I want you to come into my house and take one of anything. While you're at it, partner up with this guy http://www.tsqltidy.com/ .
Re:SQL Fiddle by jfeasel on Wednesday February 01, 2012 @03:41PM (#3539818)
I've been meaning to add links to other useful SQL resources, such as that and http://dbdsgnr.appspot.com/. If you think of more ideas, I'd love to hear them - send me a message @sqlfiddle on twitter. Thanks!
Re:SQL Fiddle by fendale on Wednesday February 01, 2012 @04:01PM (#3539900)
Not really an SQL tool, but if you use a lot of SQL then maybe you need to apply DDL and procedures to various environments. I have been working on an installer to manage your DB schema using migration scripts - http://dbgeni.com
Re:SQL Fiddle by bhousel on Wednesday February 01, 2012 @01:16PM (#3539172)
What's the point of this?
Re:SQL Fiddle by lancefisher on Wednesday February 01, 2012 @03:58PM (#3539890)
This is not just for testing SQL (which it could be handy for), but for sharing. Suppose you have a scenario where you have a few tables, and you run some SQL and it's not giving the result you expect. You can create a SQL fiddle, post it on your favorite Q/A site, and other SQL experts can quickly tweak your SQL to work right, and share the result back with you.

I'd use this tool.

Re:SQL Fiddle by mulander on Wednesday February 01, 2012 @01:55PM (#3539357)
Testing out snippets of code without altering a structure of the database you have installed locally/on a server.

Doesn't require a startup of the database - the results can be discarded and you don't have to worry about cleaning it up :)

Generally, just a fast way to test things - I would see it coming in handy during some presentations maybe?

Re:SQL Fiddle by elchief on Wednesday February 01, 2012 @02:10PM (#3539410)
the same point as JSFiddle.net I presume

http://css-tricks.com/seriously-just-make-a-jsfiddle/

Re:SQL Fiddle by ajasmin on Wednesday February 01, 2012 @02:59PM (#3539613)
SQLite support would be great. It's everywhere and really easy to setup.
Re:SQL Fiddle by jfeasel on Wednesday February 01, 2012 @03:33PM (#3539779)
SQLite is the next option on my list of databases to support.
Re:SQL Fiddle by r00fus on Wednesday February 01, 2012 @01:28PM (#3539237)
This looks like a great way to test SQL syntax differences, but it's been ages since I've needed to do so - now I either have some abstraction layer (ORM like PDO) that allows me to code in objects or I'm using key-value stores anyway.
Re:SQL Fiddle by wulczer on Wednesday February 01, 2012 @01:31PM (#3539248)
If you're referring to PHP's PDO, it's not an ORM and you're still exposed to all the syntax quirks if you have to support several databases.
Re:SQL Fiddle by codeape on Thursday February 02, 2012 @05:07AM (#3542127)
Great work, love it!

An idea: Integrate with different ORMs (Python SQLAlchemy, Ruby ActiveRecord etc.) and let users execute code against the schemas.

http://imgur.com/O5PoV

Would obviously require a sandboxed execution environment, like some of the pastebins that allow code execution (for instance http://codepad.org).

Re:SQL Fiddle by elchief on Wednesday February 01, 2012 @02:05PM (#3539390)
combine it with WWW SQL Designer and you can have some fun:

http://ondras.zarovi.cz/sql/demo/?keyword=default

these two projects should merge...

Re:SQL Fiddle by mrpollo on Wednesday February 01, 2012 @03:11PM (#3539665)
shoot me up an email if you need help with your project its my handle at gmail, great project I think it has a promising future!
Re:SQL Fiddle by jfeasel on Wednesday February 01, 2012 @03:49PM (#3539852)
Thanks for the offer; at this point, testing and new ideas are the main things I'm looking for. Shoot anything my way : https://twitter.com/#!/sqlfiddle
Re:SQL Fiddle by mrpollo on Wednesday February 01, 2012 @04:18PM (#3539985)
Will do, thanks
Re:SQL Fiddle by umrashrf on Wednesday February 01, 2012 @02:50PM (#3539579)
I spend 75% of development time on UX. You should too. Try my fiddle. http://SenchaFiddle.com/