
SQL Fiddle - neokya
http://sqlfiddle.com/
======
jfeasel
Love it when I go to lunch, just to find out that someone posts my site to
Hacker News and it gets crushed.

It will be back up and running shortly!

------
breckinloggins
One thing that would be great here would be autocompletion. I often forget
exactly what the syntax of "CREATE TABLE" is or which options I can use. The
same goes for infrequently used SQL functions (now is that date_diff or
datediff?).

You could combine autocompletion with a doc panel that automatically updates
to show the "quick reference" for the keyword you're currently typing.

~~~
jka
Slightly off-topic, but one thing that always impressed me about Microsoft's
LINQ as an alternative to SQL queries is that they considered autocompletion
up-front in the language syntax.

For SQL, it's a big challenge - you may type in 'SELECT', but your IDE still
has no idea what relation(s) you're going to access, and so it can't
reasonably autocomplete the possible fields you might want to use.

It's an interesting example of a language that was arguably designed for human
readability in the small ('give me this from that cross-referenced with this
other thing'), but in some sense became a weakness of sorts later on.

~~~
rjbwork
Would you elaborate on the weaknesses of LINQ you mentioned?

~~~
jka
To clarify: it was the SQL, not LINQ, language syntax (field selection prior
to relation selection) that I was referring to as a potential weakness (but
only once considered in the light of developer tools).

~~~
siddboots
Absolutely. The "get _something_ from _somewhere_ " syntax that SQL employs is
completely at odds with it being declarative. LINQ simply does a better job of
capturing the abstractions of relational algebra cleanly.

Not that it really matters to someone who is already familiar with SQL,
however.

------
nbevans
[http://i.imgur.com/RHxoW5J.png](http://i.imgur.com/RHxoW5J.png)

1\. Security flaw in leaking that much error info. 2\. Who uses ColdFusion in
2013?

~~~
rip747
pud's latest project is still on the homepage of HN and he wrote it in CFML:
[https://news.ycombinator.com/item?id=6519743](https://news.ycombinator.com/item?id=6519743)
Just because project X is not written in your language of choice, means
absolutely nothing. Its all about execution and this project is pretty
impressive.

~~~
pbreit
Sorry, but choice of language means more than nothing. ColdFusion is pretty
dead-end and not a particularly good choice these days for a variety of
reasons.

~~~
harel
Let me break it for you, nobody except you and some opinionated programmers on
the web, cares what language you wrote website X or web app Y in. If it works,
and you are able to maintain it - you won't hear a single word of praise from
the 'users' congratulating you on your stellar choice of language. They'll rip
you to shreds when it stops working but even then they'll never tell you off
for choosing the wrong language.

If it works, and you can maintain it - its all good. Even Cold Fusion, even
PHP, even Perl, even Brainf#@k

~~~
ryanhuff
I understand your point of view, and in specific cases, the choice has little
practical impact. However, when a business is dependent on an aging technology
(language/framework/etc), the choice can have real consequences. As one
example, when that very competent programmer who has expert level knowledge in
this aging technology decides to move on, if the technology isn't well
supported by a vendor, user community, and/or local talent pool, the business
can be in a real bind.

~~~
fredsanford
There are few consequences for the business as long as they're making more
money than they're spending.

The consequences come for the poor bastards that have that old crap on their
resume... Bus number notwithstanding...

------
jfeasel
Ok folks. It's back up now. I will keep my eye on it, hopefully it doesn't get
hugged to death again.

------
MSM
Fantastic tool.

It pops up constantly on StackOverflow and I've found it incredibly useful for
interviews. I noticed recently that the Execution Plan was added which just
opens more avenues for teaching & interviewing.

------
codinghorror
Also try [http://data.stackexchange.com](http://data.stackexchange.com) where
you can query Stack Overflow and other SE site data in real time using SQL.

------
gnarbarian
A friend of mine wrote this. If you have any questions I can try to get him on
here.

~~~
mmastrac
He's leaking stacktraces on error BTW:

no SMTP Server defined at
railo.runtime.net.smtp.SMTPClient.send(SMTPClient.java:676):676 at
railo.runtime.tag.Mail.doEndTag(Mail.java:519):519 at
wheels.global.cfml_cfm$cf._1(/root/sqlfiddle/src/main/webapp/wheels/global/cfml.cfm:93):93
at
wheels.global.cfml_cfm$cf.udfCall(/root/sqlfiddle/src/main/webapp/wheels/global/cfml.cfm):-1
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215):215 at
railo.runtime.type.UDFImpl._call(UDFImpl.java:434):434 at
railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:377):377 at
railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:774):774
at
railo.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1495):1495
at
wheels.events.onerror_cfm$cf.udfCall(/root/sqlfiddle/src/main/webapp/wheels/events/onerror.cfm:42):42
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215):215 at
railo.runtime.type.UDFImpl._call(UDFImpl.java:434):434 at
railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:377):377 at
railo.runtime.tag.Invoke.doFunction(Invoke.java:224):224 at
railo.runtime.tag.Invoke.doEndTag(Invoke.java:191):191 at
wheels.global.cfml_cfm$cf._1(/root/sqlfiddle/src/main/webapp/wheels/global/cfml.cfm:44):44
at
wheels.global.cfml_cfm$cf.udfCall(/root/sqlfiddle/src/main/webapp/wheels/global/cfml.cfm):-1
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215):215 at
railo.runtime.type.UDFImpl._call(UDFImpl.java:434):434 at
railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:377):377 at
railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:774):774
at
railo.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1495):1495
at
wheels.events.onerror_cfm$cf.udfCall(/root/sqlfiddle/src/main/webapp/wheels/events/onerror.cfm:14):14
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215):215 at
railo.runtime.type.UDFImpl._call(UDFImpl.java:434):434 at
railo.runtime.type.UDFImpl.call(UDFImpl.java:384):384 at
railo.runtime.ComponentImpl._call(ComponentImpl.java:615):615 at
railo.runtime.ComponentImpl._call(ComponentImpl.java:502):502 at
railo.runtime.ComponentImpl.call(ComponentImpl.java:1815):1815 at
railo.runtime.listener.ModernAppListener.call(ModernAppListener.java:349):349
at
railo.runtime.listener.ModernAppListener.onError(ModernAppListener.java:336):336
at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2045):2045 at
railo.runtime.PageContextImpl.execute(PageContextImpl.java:2002):2002 at
railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:297):297
at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:32):32 at
javax.servlet.http.HttpServlet.service(HttpServlet.java:722):722 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305):305
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210):210
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225):225
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169):169
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168):168
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98):98
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118):118
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407):407
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:200):200 at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565):565
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307):307
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source):-1
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source):-1 at
java.lang.Thread.run(Unknown Source):-1

~~~
k3n
Probably don't need it pasted here...

------
buckbova
I've used this for interviewees. Set them up with a test fiddle with questions
set in the comments.

~~~
goostavos
As a guy about to finish up school and make his way into the work force, would
you be willing to release some of the questions you use in interviews. It be
neat to see which areas I need to patch up knowledge wise!

~~~
buckbova
Try this quiz. It's based on a quiz I saw posted on HN a while back.

[http://sqlfiddle.com/#!3/3973f/1](http://sqlfiddle.com/#!3/3973f/1)

Edit: I'm not allowed to reply just yet, so I'll post here.

You need to add the boss first to the employee table with a NULL bossID.

Then you add another employee that has a bossID that refers to that last added
record.

~~~
jsmeaton
Aww - no test data? And when trying to add test data, I get errors due to the
self-referencing foreign key. Perhaps the schema could do with a

> DEFAULT (IDENT_CURRENT('dbo.Employees'))

on the BossID column. Been awhile (years) since I've worked with SQL Server.

------
nikentic
This must be the ugliest error screen I have ever seen. Is this 1990?

~~~
Gigablah
Quick, add Bootstrap 3 and flat UI to everything!

------
jpwagner
i still haven't seen the main site, but i found these:

[http://sqlfiddle.com/about.html](http://sqlfiddle.com/about.html)

[https://github.com/jakefeasel/sqlfiddle](https://github.com/jakefeasel/sqlfiddle)

------
mountaineer
Been a while since I've seen a coldfusion error dump

------
jfeasel
If anyone is interested in how this site gets used, here's an idea:

[http://stackoverflow.com/search?tab=newest&q=url%3a%22http%3...](http://stackoverflow.com/search?tab=newest&q=url%3a%22http%3a%2f%2f*sqlfiddle.com%2f*%22)

------
wehadfun
Used this a long time ago it is a great tool for figuring out a SQL query.

------
JimmaDaRustla
Nice! Might be good to teach some co-workers some SQL stuff rather than
drawing on white-boards and drafting up SAS jobs.

------
smsm42
Excellent tool, especially for checking if certain set of SQL works on certain
platform. I wish they added DB2 too...

------
shennyg
Used this last night to get help debugging an issue on #mysql, worked great.
thanks Xgc and jfeasel

------
wassago
Cool but it can't handle traffic like JSFiddle (the originator of all code
playgrounds) can.

------
rip747
this project has always impressed me. keep telling myself that i need to
browse the source to see how it was all done. congrats jake!

------
jvoorhis
Is the site slow?

~~~
yebyen
The site is apparently HN'ed...

railo.runtime.net.mail.MailException which seems to be a framework error from
a ColdFusion application server.

Shame on OP, posting something cool and letting it get upvoted without warning
the author/host in advance! :)

~~~
neokya
Sorry about that. I didn't expect that would happen.

Will definitely do that next time. I found it really cool and thought of just
posting it on HN.

Edit: Pinged @sqlfiddle on twitter. I hope maintainer did notice it.

~~~
yebyen
I was only joking. How do you know it's going to get upvoted anyway? I think
it's probably good netiquette though.

------
neokya
The site is up again :)

------
dancecodes
its cool but slow

