I am the author of SQL Fiddle, an online environment for testing and sharing database problems. The target audience for my site is for pretty technically-sophisticated users (database programmers, basically). One of the features I've implemented recently has been the source of some confusion, however, and I'm not sure how to make the whole concept more clear.

Please see this StackOverflow answer for a perfect example of this particular problem:

why is the sum of five 1 = 4

As I mention there, the problem is that there are two competing functions at play when you execute queries in my left-side panel. One function is the breakup of the individual statements executed, so that I can fetch and display the results from each statement in the below section. The other function is that sometimes, I need to run statements together as a "batch", so things like variables (as in the above example) get executed together.

The current solution to accomodate both functions is to change your "Query Terminator". This is a special character (or character combination) that is used to define the end of a query batch. I allow users to indicate which query terminator they would like to use by selecting it from a dropdown button (see the [ ; ] button on the site). This works, but few people seem to understand how to use this button to change the behavior of their query execution.

I built this button the way I did because I didn't have a ton of screen space to work with and this is a not-often needed function. However, I clearly need to do more make it obvious about how to use this. My very smart users are getting baffled by the error messages or strange behaviors that this function was intended to resolve.

Some things I've thought of:

  • I could show the actual query statements being executed for each result set; this would make it clear what exactly was being used to produce each one, and would lead the users to recognize the problem as one of query termination.

  • I could write up a FAQ/Help section that covers this function (and others), however I don't really have anything like this currently and I'd prefer to find a mechanism that was intuitive enough so that reading the help manual wouldn't be necessary.

  • I could use a bootstrap tooltip that came up when hovering over the button that attempts to explain this briefly.

2 Answers 2


I think two others approach might help :

when typing, on a status area on the right of your query delimiter you can make appear "2 queries" when the first delimiter is entered and then "X queries". it could help if the status is somehow attached to the [;] button, telling the user that this button will change how the code is segmented

the second thing is on the result area, instead of "TASK_PERFORMED", print "last query result (show results of X previous queries)" the text between parenthesis being a button that switch to a mode where you display each results (and maybe even each associated queries)

  • I like this idea! I'll try it out, see how it works. Commented Jul 28, 2012 at 17:36

It seems that your term "Query Terminator" is functionally equivalent to the MySQL DELIMITER command (which is almost always employed for exactly the reason you specified when writing stored procedures).

The first thing that comes to mind is to call it a "Delimiter", since that's a known term and it should capture a larger portion of your highly SQL-literate audience. While I don't think 'query terminator' is at all misleading, it may be unexpected in the context of SQL.

Additionally, the button doesn't seem to do anything (at least until the code executes). Following from my inference that it executes an underlying DELIMITER command, what do you think of inserting a DELIMITER x pair into the code pane itself at the cursor location, or wrapped around selected text? After a single click, I believe that most SQL-literate users would understand what the button does.

  • 1
    Thanks - I can see the value in changing the name and borrowing from that concept (which you are exactly correct in associating with this - the MySQL DELIMITER command is what inspired this function). As far as inserting something into the actual body of the code - that would be technically problematic, esp. since DELIMITER is very MySQL specific and I support several other databases. That being said - I will take your suggestion that it appear to "do something" under advisement, and see what I can come up with. Thanks! Commented Jul 25, 2012 at 17:20
  • @JakeFeasel I'm sure it would be problematic, I was going to rate it highly on the PITATI (Pain in the *** to implement) scale...
    – msanford
    Commented Jul 25, 2012 at 17:35
  • 1
    PS Great job on SQLFiddle; I love it!
    – msanford
    Commented Jul 25, 2012 at 17:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.