Questions tagged [sqlfiddle]

A tool for easy online testing and sharing of database problems and their solutions.

SQLFiddle is a tool for easy online testing and sharing of database problems and their solutions. The project began in January 2012, and was built by Jake Feasel, a web developer originally from Anchorage (Alaska).

SQLFiddle currently supports scripts for the following database engines:

  • MySQL 5.5
  • MySQL 5.6
  • Oracle 11g R2
  • PostgreSQL 9.3
  • SQLite (WebSQL)
  • SQLite (SQL.js)
  • MS SQL Server 2014
  • MS SQL Server 2008

Related links:

140 questions
42
votes
2 answers

Is SQLFiddle broken? Errors for Oracle, SQL Server, ...?

I'm trying to create a simple table in SQLFiddle for Oracle database and keep getting the cryptic error: Create script error. Here is a simple script it failed on: create table t1 (f1 number, f2 number, f3 number); Could anyone can help with…
Walter_Ritzel
  • 1,387
  • 1
  • 12
  • 16
29
votes
6 answers

Are there sample tables on sqlfiddle

Are there any default tables on SqlFiddle that I can query from? I want to try a basic analytical query on a simple table but I don't want to set up the schema and seed data etc. normally I would do something like select * from all_objects (…
monkeyhouse
  • 2,875
  • 3
  • 27
  • 42
24
votes
6 answers

Is there a phpFiddle and sqlFiddle that work together?

Is there an online phpFiddle and sqlFiddle that work together so that I can do something with the test sql data? Using http://phpfiddle.org/ and http://sqlfiddle.com/ but would be great if they could work together. I'm sure someone out there has…
Craig
  • 2,093
  • 3
  • 28
  • 43
18
votes
2 answers

Execute triggers stored procedures on SqlFiddle. Mysql

Does SQL-fiddle facilitate execution of triggers/stored procedures? I have been unable to execute even the simplest form of stored procedure on sqlfiddle DELIMITER $$ DROP PROCEDURE IF EXISTS myProc $$ CREATE PROCEDURE…
Sami
  • 8,168
  • 9
  • 66
  • 99
16
votes
1 answer

how to get PL/SQL in SQLFiddle?

Any clues how to get PL/SQL in SQLFiddle? I've tried begin dbms_output.put_line('Hello World'); end; / or begin null; end; / which works in SQL*Plus (or TOAD or SQLDeveloper or ...) but SQLFiddle just gives me ORA-06550: line 2, column 36:…
GWu
  • 2,767
  • 18
  • 28
11
votes
2 answers

LEFT OUTER JOIN query not returning expected rows

My aim is to do exactly what a LEFT OUTER JOIN intends to do using the 4th venn diagram: SQL Diagrams: My query isn't returning any values at all, where in fact, it should be returning all within the Consultant_Memberships minus the one that is…
user860511
10
votes
3 answers

Why does a SQL query with != 0 not include NULL values?

Here is a sqlfiddle of two test tables: http://sqlfiddle.com/#!9/33361/3 tl;dr: why does a SQL query with != 0 not include NULL values? I am LEFT JOINing the two tables. I'd like to see rows which either have NULL in tableB.field1 or a 1 in…
dmgig
  • 4,400
  • 5
  • 36
  • 47
8
votes
3 answers

Select multiple rows using id in SQLite

I am trying to query specific rows from my SQLite database using WHERE conditions on the IDs of the rows I want. However, the query is not returning any results, and it is causing my logger to throw an error stating that there is a syntax…
Geowil
  • 624
  • 1
  • 12
  • 36
8
votes
2 answers

What's wrong with my SQL Fiddle query?

Take a look at this simple query in SQL fiddle: http://sqlfiddle.com/#!2/c1eb6/1. This is a super-simple update query, why is it producing an error? I wonder if could it be a bug in that site? Build Schema: create table your_table (some_column…
jeffery_the_wind
  • 17,048
  • 34
  • 98
  • 160
7
votes
3 answers

SQLFiddle: must declare the scalar variable error

I'm trying to execute next SQL statement (SQL Server 2008 Profile) DECLARE @fun int; SET @fun = 40; select cast(@fun as varchar(10)) + 'hello' and SQLFiddle gives me the error: Must declare the scalar variable @fun Where I'm…
Andrey Morozov
  • 7,839
  • 5
  • 53
  • 75
6
votes
0 answers

SQL Fiddle Request content too large (>8000)

Can anyone help, please? I cannot build a schema due to the error 'Request content too large (>8000). I noticed a comment about 'Format Code' which resolved the problem for someone else, but that option isn't available in the build schema…
Jan447
  • 61
  • 1
  • 2
6
votes
1 answer

is there a limit to what sql fiddle can handle? sql fiddle doesn't compile anything and returns no error messages

I recently created a query that compiles successfully and returns the desired result. When I used that piece of code as a subquery in another piece of code that a user on stackoverflow came up with for me, I encountered a few problems, which were…
user1569897
  • 437
  • 1
  • 5
  • 12
5
votes
11 answers

How to express a range over multiple columns with hierarchic relation?

I'm porting an old accounting software to SQL. Here's a sample made up chart of accounts: Account SubAcct SubSubAcct SubSubSubAcct AccountNumber Name 1110 0 0 0 1110 Banks 1110 1 0 0 1110-1 US Banks 1110 1 1 0 1110-1-1 Bank…
Carlos Gutiérrez
  • 13,972
  • 5
  • 37
  • 47
5
votes
3 answers

SQL Query to calculates 'reserved' inventory items

We are creating a inventory system for items called readoutprobes and readoutprobekits. The schema, below, is simplified, using the words items and itemkits. An itemkit, is a predefined collection of 1 or more items, i.e. a kit. In a kit, a…
Totte Karlsson
  • 1,261
  • 1
  • 20
  • 55
5
votes
2 answers

SQL Fiddle Output Error

Actually I am quite new to PL/SQL I created the following table using oracle pl/sql in SQL Fiddle create table Employee(name varchar2(100),id integer, salary integer,PRIMARY KEY(id)); insert into Employee(name,id,salary) values('sa',94,100); insert…
user2133404
  • 1,816
  • 6
  • 34
  • 60
1
2 3
9 10