or
Jack DouglasCC0 1.0
[db<>fiddle](https://dbfiddle.uk) was designed with markdown-based Q&A in mind, so it seems sensible to use a post here for comments/suggestions/bug reports.

Please feel free to comment in the chat room attached to this post.

**Please post concrete feature requests and bug reports as answers below.** Please also post any feature requests and bug reports about db<>fiddle integration with TopAnswers.

The current list of supported databases is:

* SQL Server 2012, 2014, 2016, 2017, 2017 Linux, 2019 and 2019 Linux RC1
* Postgres 8.4, 9.4, 9.5, 9.6, 10, 11 and 12
* Oracle 11.2 and 18
* MySQL 5.6, 5.7 and 8.0
* MariaDB 10.2, 10.3 and 10.4
* SQLite 3.8, 3.16 and 3.27 (but 3.16 is currently offline for [security reasons](https://security-tracker.debian.org/tracker/CVE-2018-20346))
* Db2 Developer-C 11.1 (with lots of thanks to [@mustaccio](https://dba.meta.stackexchange.com/users/23721/mustaccio))
* Firebird 3.0

Here's an example (the image links to the fiddle):

[![SQL Server 2019 'help'](/image?hash=407870c3b82d22484cb884d64c05e7a70ca3f3e97cd776b4f82cf701a55e56a3)
](https://dbfiddle.uk/?rdbms=sqlserver_2019&fiddle=9bcd60e2bcd7966fc3be475addab8eb2)

and here's a really interesting one just for fun:

[![Naughts and Crosses](/image?hash=91efa2c2370e503e4158d295924693af7ce4f9eb25d8435126c2fcbb87e690fd)](https://dbfiddle.uk/?rdbms=postgres_11&fiddle=71940aadda50f55bfede87606cd1dc2c)

finally, just because we can, here is the same fiddle integrated into this post. You can edit it and run it live right here:

<>https://dbfiddle.uk/?rdbms=postgres_11&fiddle=71940aadda50f55bfede87606cd1dc2c
Top Answer
CC BY-SA 4.0PeterVandivier
`bug` `fixed` YYYY-MM-DD for SQL Server

![](https://imgs.xkcd.com/comics/iso_8601.png)

It looks like SQL Server is the only non-ISO localisation at the moment, but I've embedded a few of my favourites below for ongoing reference.

<>https://dbfiddle.uk/?rdbms=sqlserver_2019&fiddle=b5aa1e2bb74237fde0de2c5ccb632c98

<>https://dbfiddle.uk/?rdbms=postgres_12&fiddle=a9e479467e8185aaf4e8f6eeff753dbc

<>https://dbfiddle.uk/?rdbms=mysql_8.0&fiddle=47edd2b88c652aa72de5e000ae288216

<>https://dbfiddle.uk/?rdbms=sqlite_3.27&fiddle=2f53a982cb229c7959b73bf014848091
Answer #2
CC BY-SA 4.0PeterVandivier
`bug` `planned` Brittle fiddle one-boxing in chat

One-boxing in small fiddles in chat is great. Sadly, it seems that leaving a page and returning causes the one-boxing render to break. 

See [this chat thread][1] for context & repro steps.  

Note that the transcript one-boxing appears to be stable and does not appear to be affected by this behaviour. 

Using...

> Google Chrome Version 79.0.3945.130 (Official Build) (64-bit)

[1]: https://topanswers.xyz/transcript?room=644&id=16493#c16493
[2]: https://topanswers.xyz/transcript?room=37&id=16598#c16598
Answer #3
CC BY-SA 4.0Ami
`bug` clicking 'Back' should switch back not only the query, but also the database selection.

---

Using Windows 10.0.17763 and Google Chrome 79.0.3495.

Steps to reproduce:
-------------------
Browse to dbfiddle.uk, change query to 'SELECT 1' and click 'run'.
Default engine is SQL Server 2019 and the URL reflects this correctly: https://dbfiddle.uk/***?rdbms=sqlserver_2019***&fiddle=<something>

Change database selection to PostgreSQL 12 (or any other), change query to 'SELECT 2' and click 'run'.
URL now reflects correct engine https://dbfiddle.uk/***?rdbms=postgres_12***&fiddle=<something>

Click browser 'Back' button.
query is correctly reverted to 'SELECT 1' and previous result is shown. URL shows https://dbfiddle.uk/***?rdbms=sqlserver_2019***&fiddle=<something>

However, menu selection remains in 'Postgres 12', and clicking 'Run' again changes the URL back to 'Postgres 12'.

Expected result:
----------------
page should respect URL specification and clicking 'Back' should switch back not only the query, but also the database selection.
Answer #4
CC BY-SA 4.0PeterVandivier
`feature-request` please add an (opt-in) cookie to remember the last platform a user was on?

# User cookies

When I was a SQL Server Man™️ I appreciated that db<>fiddle launches by default to a recent SQL Server `@@version`.

Now that I'm mainly a PostgreSQL Comrade, I kind of wish it would launch to PostgreSQL. 

Does it make sense to add an (opt-in) tracking cookie to remember the last platform a user was on? Perhaps even integrating with an topanswers profile if available?

This seems like it could be early-stages groundwork for tracking your own specific fiddle history as well, though; so I suppose it could a mixed bag as to how you feel about that as a concept (whether it's a feature or an imposition).
Answer #5
CC BY-SA 4.0PeterVandivier
`feature-request` please add CockroachDB

---

## CockroachDB integration

The [19.2 release][2] makes it look like integrating CockroachDB to db<>fiddle might be relatively easy. Would you be interested in adding CockroachDB as a supported platform?

The [`cockroach demo`][1] command ostensibly provides an ephemeral in-memory enterprise instance; and having seen it in action it appears to do what it says on the tin :)

[1]: https://www.cockroachlabs.com/docs/dev/cockroach-demo.html
[2]: https://www.cockroachlabs.com/blog/cockroachdb-19dot2-release/
---

> **Update Nov 21 '19** - CockroachDB licensing reps have confirmed privately that db<>fiddle is within the acceptable usage of `demo`. Docs have been sent to @Jack for records keeping.

---

~Consolidated~ ~from~ [~here~][3] ~for~ ~tracking.~
 
[3]: https://dba.meta.stackexchange.com/a/3285/68127
Answer #6
CC BY-SA 4.0PeterVandivier
`bug` Embedded fiddles should respect `&hide=` args

---

I'm drafting through https://topanswers.xyz/databases?q=424 and part of my reproduction includes loading ~60,000 rows of data. In the link as written... 

* https://dbfiddle.uk/?rdbms=sqlserver_2017&fiddle=4726813c2d4d6c23fd5d7a50756de4b6&hide=2

...the trailer arg `&hide=2` collapses the batch where I do the load. In the current embed though, the hidden batch is revealed. 

The current fiddle has 5,000 rows (loading the 1k batches from copy-paste is rather taxing on my browser). I'll wait update the fiddle with the remaining rows for the time being 🙂
Answer #7
CC BY-SA 4.0PeterVandivier
`feature-request` `declined` add an 'Update this post' button on embedded db<>fiddles on TopAnswers

---

Currently it looks like editing and/or running the fiddle from the embed doesn't change the post. This is obviously good design, but I suggest adding an `Update this post` button or something similar alongside the embedding. This would make it clear to the user that the underlying post may need to be modified if they want it to persist the changes they have just typed 

Some related thoughts:

* Button could hotlink to the `/edit` analogue with the commit message pre-populated à la "_updated fiddle from `abc` to `def`_"
* Perhaps the button only appears on-edit or on-run when a new fiddle hash is generated?
* Does it make sense to track a fiddle's "lineage" & possibly expose it to users to "_go back to that one edit I forgot what I did on but I know what the results looked like_"
* Is there a not-gross way to expose the diff of either the post batch or the last-run batch to the active editor in the embed?
Answer #8
CC BY-SA 4.0Arioch
`bug` `fixed`: Firebird, datatypes, aligning

https://dbfiddle.uk/?rdbms=firebird_3.0&fiddle=c80635f28efd64914a70160a0cc46ecf

Check last query, and it is especially visible in MarkDown export.

Columns 3 to 5 are left-aligned, despite being numeric.

I suspect the type BigInt or what they are is mis-detected for textual one.
Answer #9
CC BY-SA 4.0Arioch
`feature-request` [`declined`](https://topanswers.xyz/transcript?room=37&id=17302#c17302) Allow multiple statements per batch for Firebird again

---

Firebird, DDL, multiple statements

As far as I remember, this used to work, but no more.

Perhaps parser fails to split script into distinct SQL statements.

https://dbfiddle.uk/?rdbms=firebird_3.0&fiddle=300756710cf77de8d754f04bbcfa07de

```
create table KPS1 ( ID integer primary key, DATE_FROM date not null, DATE_TO date not null ); 
create table KPS2 ( ID integer primary key, DATE_FROM date not null, DATE_TO date not null )
```

Dynamic SQL Error SQL error code = -104 Token unknown - line 6, column 1 create
Answer #10
CC BY-SA 4.0John aka hot2use
`feature-request` `retracted` Add support for SQL Server `GO [count]` syntax

---

# Support for SQL Server `GO [count]` syntax

In SQL Server you can add the batch operator [`GO`](https://docs.microsoft.com/en-us/sql/t-sql/language-elements/sql-server-utilities-statements-go?view=sql-server-ver15) to the end of either a single or a bunch of commands like this:

    SELECT 1
    GO
    
Or even like this:

    INSERT INTO [TableName] (SomeText, SomeInt)
    VALUES ('false', 1)
    GO
    
If I want to really insert a bunch of items into a table I can tell `GO` to do this multiple times like this:

    INSERT INTO [TableName] (SomeText, SomeInt)
    VALUES ('false', 1)
    GO 633
    
...and the query "batch" will be executed 633 times. 

This is helpful when inserting a fixed amount of pseudo data into a table to reproduce issues in a development environment (and would be helpful in db<>fiddle).

_Sadly I can't add a db<>fiddle to show you how it should work ;-)_

I think the `GO` utility statement has been discussed before, but I don't think the additional `count` was part of the discussion.


### Reference Material

[SQL Server Utilities Statements - GO](https://docs.microsoft.com/en-us/sql/t-sql/language-elements/sql-server-utilities-statements-go?view=sql-server-ver15) (Microsoft | SQL Docs)
Jack Douglas
this is one of the few places you'd notice because generally we don't post multiple answers to the same question…
Jack Douglas replying to PeterVandivier
I think that might be a hangover from the earlier bug — it caches answers to each question individually so if you answered here while the bug was active, then try and answer after it's fixed, you'll get the old text. Only once though.
PeterVandivier
i'll leave it for a few mins if you want me to check anything on my end
PeterVandivier
looks like the cached previous post may be back. just went in to post a new answer and i'm seeing the "brittle fiddle one-boxing" rev 1 looks like
Jack Douglas replying to Arioch
I agree on all counts — however db<>fiddle has a golden rule: we do not parse SQL that is being processed. It's a rule that has served us well so far, it saves us from all sorts of complexity down that route.
Arioch replying to Jack Douglas
@JackDouglas - split batch is not a problem, copy-paste is not hard to do. The problem is visual clutter and noise. Non-grouped statements are harder to read. It is pity DB-Fiddle can not split the script into statements and feed them to server one by one...
Jack Douglas
@Arioch do you know about the 'split batch' button?   
![Screenshot 2020-02-04 at 08.49.49.png](/image?hash=244b61bb24957a970d9e7d8d73ab3e4af579ea29d9a37b1408e18de089ec60e2)  
 I don't think the PHP Firebird/Interbase driver supports multiple statements per batch like some others do so we can't enable this in db<>fiddle.
Jack Douglas replying to PeterVandivier
you can hide some of the batches, though topanswers doesn't honour that yet — it should though and we'll no doubt get round to that because it'd be useful here
PeterVandivier
@Jack should there be a community etiquette around max size of embedded fiddles? i was going to edit those firebird answers to be one-boxed but the (first one at least) was large enough that i paused. 
PeterVandivier replying to Jack Douglas
cool beans & no worries! glad to have it referenced explicitly though. fwiw - i think it'd be totally acceptable to throttle fiddle one-boxing in chat to one or 2 batches or something sensible like that. tbh, i was actually a bit surprised/impressed that fiddle one-boxing in chat is supported at all so hear it needs to be throttled a bit makes a lot of sense
Jack Douglas
@PeterVandivier that's actually deliberate because when there are several it can slow down rendering unacceptably. We have a plan to fix it though by caching db<>fiddle results on the client. Will update your post when that lands!
John aka hot2use replying to Jack Douglas
I certainly will
Jack Douglas replying to John aka hot2use
thanks @John but do keep them coming :)
John aka hot2use
I have retracted the feature request, edited it and left it here for historical reasons.
Andriy M
`GO number` itself already raises questions, for instance how to handle multiple result sets, especially if someone accidentally runs it with a big number
Andriy M
I'm only slightly worried by the fact that it would created a precedent for others to request all sorts of client side features to be implemented for other DBs as well, and some of them might be either too difficult or too rubbish but Jack would be too nice to refuse and try to implement them anyway, and dbfiddle might end up unnecessarily complicated, in terms of both maintenance and usage
PeterVandivier
esp. b/c it seems like the kind of thing that _seems_ simple enough, but might actually require some non-trivial work on the backend to support it
PeterVandivier
if & when db<>fiddle is open-sourced a la TA, it'd be a fun "up for grabs" type issue, but i don't think it'd important enough to divert Jack or James from other work atm
PeterVandivier
i've been bit by it and it would be nice, but imo it's not the biggest deal
John aka hot2use
Opinions? Anybody?
John aka hot2use replying to Andriy M
Seeing as `GO` seems to be a client-side "operation" as per Andriy's feedback, I could retract my suggestion altogether. 
John aka hot2use replying to Jack Douglas
I'm not sure about the "generic" bit, but a mechanism to execute something x number of times would be cool.
Andriy M replying to PeterVandivier
Ah yes, we've already had that discussion
Jack Douglas replying to Andriy M
I don't think it does
PeterVandivier replying to Andriy M
[deja vu 😜](https://chat.stackexchange.com/transcript/message/51423950)
Andriy M
It's like the MySQL `DELIMITER` instruction. Does dbfiddle support MySQL's `DELIMITER`?
Andriy M
@John @Jack `GO` is a client-side feature. In addition to having to figure out how to handle multiple outputs it can produce, implementing it may also pose a question whether (or which) other client-side features should be implemented as well (including those of other platforms). Or does dbfiddle have any implemented already?
Jack Douglas
I guess we could compare the output and if they are all the same then print just once (or should the 'repeat' count)
Jack Douglas
@John are you really asking if we can have some generic mechanism for executing batches multiple times? That sounds like something that might be possible. What would we do with the output from the batches though — presumably not just display it all (like this: https://dbfiddle.uk/?rdbms=postgres_12&fiddle=f5e1af43aff680d5036121284716c999)
Andriy M
Based on my past experience, I'm guessing Chrome would do this on any page that has an input form. And Dbfiddle.uk of course would be a typical example, which is why the issue has been raised. It used to work like that for me in Firefox, but apparently they've since changed/fixed it
GeorgePalacios replying to Andriy M
I get it in Chrome
Andriy M replying to GeorgePalacios
In Firefox?
GeorgePalacios replying to Andriy M
That still happens to me all the time lol!
Andriy M
@Ami This reminds me of a similar issue I used to have when searching with Google. Basically, I would first enter one request, say 'foo', click 'Search', get the results, then enter 'bar' into the search box, 'Enter', get new results, then click 'Back', and I would get the previous search results, for 'foo', but the search box would show 'bar'. The last time I experienced that was quite some time ago, and I never found out for sure if it was an issue with the site or my browser, but I believed it to be with the browser (or browser + OS maybe). For the record, I don't experience the issue you've described in my Firefox on Win 7.
Jack Douglas replying to fds
thank you, that's all fixed now!
fds
MySQL 5.7 appears to be out of disk space at the moment: https://dbfiddle.uk/?rdbms=mysql_5.7&fiddle=480cf6b4bd63a8d4b2aff6a4f0e0efd5 (Errcode: 28 - No space left on device)
PeterVandivier
:-P
Jack Douglas
moving to DC might be nice, idk :) 
PeterVandivier replying to Jack Douglas
~~whaaaaaaat?! 😱 we're not gonna be neighbors anymore?? 😢~~  
  
misread as "_moving_ **to** _DC_", plz disregard
Jack Douglas
fds — [a day ago](https://topanswers.xyz/transcript?room=37&id=13633#c13633)  
>Not on mobile, Mac laptop Apple Safari, but it very well might be mistaking that for mobile. Now I'm wondering what the "real" site is supposed to look like. Everything still functioned fine. I see like a play button / hamburger menu, click on it, and up pops a menu containing "comments/suggestions/bugs." That's what lead me to dba.se.
Jack Douglas replying to PeterVandivier
I don't know if it's even necessary — the real problem is that the link in the hamburger was still pointing at the dba.se post!
Jack Douglas
probably worth moving any active feature requests you have here though?
Jack Douglas
we are moving DC over the next few weeks/months so if it does happen it'll be after that
Jack Douglas replying to PeterVandivier
heh that does show it would be useful :)
PeterVandivier
@Jack i know you're suuuuper busy with TA atm, but just to bump the issue :), [this seems like a freebie plug for cockroachdb on db<>fiddle](https://stackoverflow.com/q/59764636/4709762)
PeterVandivier
give it a "historical significance" banner and stop new answers?
PeterVandivier
@Jack is it worth trying to close / lock the [meta.dba.se post](https://dba.meta.stackexchange.com/questions/2686/a-new-fiddle-for-dba-se) ?
Jack Douglas replying to Andriy M
interesting, thanks :)
Andriy M replying to Jack Douglas
Not sure. When I first joined Stack Overflow, I thought Delphi would be speciality but I quickly found how much less I know about it than some other people. Our company used a rather outdated (pre .NET) version at the time, even though at least Delphi XE2 was already around then. We *have* switched to XE8 since then, but I'm still not very versed in the newer features, so I wouldn't be able to provide much help.
Jack Douglas replying to Andriy M
if we had a Delphi community here would you be interested? I'm asking as an academic question — we'd probably see if things like C# would fly first, but I'd be interested to know nonetheless.
Andriy M
I know some other things as well, a little, as I've never used them professionally and haven't created anything major using them to claim I *actually* know them
Andriy M replying to Jack Douglas
Actually I do still work with Delphi and almost nothing else, I mean as a major part of my work and not counting SQL Server. I've had to deal with an ASP script or two a few times, and also do some Windows batch scripting to solve some tasks and as a helping tool but that's just my choice. I know PoSh would be much superior most times, but it requires learning and I've been increasingly lazy learning new stuff lately
Jack Douglas replying to Andriy M
what programming languages do you use, presumably not still delphi?
Jack Douglas
all very true!
Andriy M
Or a few
Andriy M
I guess it's a discussion worth its own meta question
Andriy M replying to Jack Douglas
Makes total sense to me, though at the same time, it may not be always obvious where to draw the boundaries
Andriy M replying to Jack Douglas
Cool
Jack Douglas replying to Andriy M
I'd like to split the SO scope into smaller communities here if we can get people interested
Jack Douglas
I will add that at some point
Jack Douglas replying to Andriy M
that shouldn't be a problem — it just needs to be added to the format string
Andriy M replying to Jack Douglas
What about the time zone info for `datetimeoffset`? Dbfiddle currently [doesn't seem to show the time zone](https://dbfiddle.uk/?rdbms=sqlserver_2019&fiddle=397dd18db05a66fba2ab965ea73cb100). Is that a problem too at the moment?
Andriy M replying to Jack Douglas
Oh, will it be a dedicated community for VB.NET? Are you intending to keep those people apart from everyone else?
Jack Douglas
as soon as we have a vb.net community here I'll post a question :)
Jack Douglas
there were hints it might be possible, but it may well be beyond me
Jack Douglas replying to Andriy M
I looked into this a bit, but couldn't work out how to get the precision info in .net
Andriy M
All of `time(1)` through `time(7)` show 7 digits in the fractional part, though
Andriy M
However, I did notice something peculiar. You can also specify an arbitrary precision for the `time` type as well. And I've noticed that `time(0)` at least shows without the fractional part, while `datetime2(0)` still shows the `.0000000`, [demo](https://dbfiddle.uk/?rdbms=sqlserver_2019&fiddle=4c9bccadd0672068960d9a1c7dd917c8)
Andriy M
I wish could suggest something on the presentation part, I mean in particular reflecting the `n` of `datetime2(n)` correctly in the output
PeterVandivier
🎉
Jack Douglas
:)
Andriy M replying to Jack Douglas
Confirmed, things are back to normal in this department, great job!
Jack Douglas replying to Andriy M
ooh yes that's not good — I think I worked it out now though thanks again for helping me with all this (also @PeterVandivier)
Andriy M replying to Jack Douglas
Hey Jack, very nice, it [does appear](https://dbfiddle.uk/?rdbms=sqlserver_2019&fiddle=550e5882de11565e90a1b6b1be4fdc78) to be working correctly now. However, when I tried to re-run [the same test script](https://dbfiddle.uk/?rdbms=sqlserver_2019&fiddle=f9dbc388e0d0fdf4cf2ade4f806d7611), it failed for me. As far as I've managed to establish, it's `datetimeoffset` that breaks it. That is to say, any script with a `datetimeoffset` in it seems to fail now, so I can't give you a link for testing, but you can just try running `SELECT SYSDATETIMEOFFSET();` in any version of SQL Server to see for yourself.
fds
Finally, Db2: https://dbfiddle.uk/?rdbms=db2_11.1&fiddle=4431fa7949ccffec75d88787f8dc1ec8 This was fun :)
fds
Figured out what was wrong with the MySQL 8 version, happy to say it wasn't a dbfiddle issue. There's simply a default 1K limit on group_concat(), but you can override. https://dbfiddle.uk/?rdbms=mysql_8.0&fiddle=14c70d261104bbae1c244cec2591a321
fds
got it :)
fds replying to Jack Douglas
let's see
fds
Yeah, I'm probably doing something wrong, and not properly marking what I'm typing as being "replies to you," but unsure how to do that.
Jack Douglas
ah, didn't notice that message scrolled!
fds
Note in PG you don't need that ugly double SELECT because it allows you to ORDER BY on string_agg(). That hack was solely for the Firebird version.
fds
I'm yet to tackle Db2, and I'm fighting some kind of string truncation issue with MySQL 8, at least on dbfiddle.
fds
Nah, the PG version was one of the first and most amenable. :) I posted all the links, including the SQLite one above, that's verbatim from the manual
Jack Douglas
have you got a link to the sqlite version, I'd like to tweet it…
Jack Douglas
in case you haven't done postgres yet :)
Jack Douglas replying to fds
https://dbfiddle.uk/?rdbms=postgres_12&fiddle=29d878905d0df2b229c20340e6c110c2
fds
All I'm doing is entertaining myself by porting it over to everything else.
fds
But again, I take no credit, it's simply from the SQLite manual, https://sqlite.org/lang_with.html
fds
Haha, here are the other versions that are 100%: https://dbfiddle.uk/?rdbms=mariadb_10.4&fiddle=20a848602194b3bce6a8617ba0df52dc
https://dbfiddle.uk/?rdbms=postgres_12&fiddle=c069a2fc0a9f3c09a53984b90cfe2155
https://dbfiddle.uk/?rdbms=sqlserver_2019&fiddle=281d1897157594cf04ef0aef9df26357
https://dbfiddle.uk/?rdbms=sqlite_3.27&fiddle=0d6194c1b676c7d59a20eebb9e748124
https://dbfiddle.uk/?rdbms=oracle_18&fiddle=a309f1e1712317496a9dadb3602ee71f
Jack Douglas
https://dbfiddle.uk/?rdbms=postgres_11&fiddle=71940aadda50f55bfede87606cd1dc2c
Jack Douglas
on a par with this:
Jack Douglas replying to fds
that's brilliant
fds
Still got to try and make it work in Db2 thank to dbfiddle, never had that installed myself.
fds
A fun silly recursive CTE example from the SQLite docs that as an experience I adjusted to work in any dbms I could find. :)
fds
Got to be honest I only play with Firebird for fun & fascination myself, but I also keep it running on my home server. I was amusing myself with this https://dbfiddle.uk/?rdbms=firebird_3.0&fiddle=db210d5f9d5d852b5daece8c789118c4 when I noticed the bug.
Jack Douglas
I'm very pleased we have Firebird on db<>fiddle, it is a nice little database
Jack Douglas
heh, not everything, but thanks for the encouragement on that too
fds
It's all right-- only shame it probably would have benefitted you more if I spent that time over here rather than there. Thank you again! The speed at which you fix things is scary.
Jack Douglas
sorry you had to go to all that trouble to report the issue!
Jack Douglas
I've fixed the link in the hamburger now too :)