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
4
votes
2 answers

SQLFiddle no output

When i build the following schema: CREATE TABLE CUSTOMER( CUSTOMER_ID INT NOT NULL, PRIMARY KEY(CUSTOMER_ID) ); INSERT INTO CUSTOMER(CUSTOMER_ID) VALUES(1); and run the following query: SELECT CUSTOMER_ID FROM CUSTOMER; I get no output. Can…
Skywarp
  • 989
  • 3
  • 15
  • 32
3
votes
2 answers

how to group consecutive rows?

So, I have a table with rows like this: Ev_Message Ev_Comment EV_Custom1 Ev_Time_Ms ------------------------------------------------------------------------------------- Machine 1 Alarm 5/23/2016 11:02:00 AM Alarms…
3
votes
2 answers

Unable to use declare statement in CREATE FUNCTION

I am trying to use a declare [variable] statement within a CREATE FUNCTION statement. My code is /* DELIMITER // */ CREATE FUNCTION hello_world() RETURNS TEXT DECLARE bae int; BEGIN RETURN 'Hello World'; END; // /* DELIMITER ; */ The code just…
3
votes
1 answer

Why is this SQL code not working on SQLFiddle.com?

I want to put this on the SQL fiddle site for another company that I am working for and it seems that it does not like my syntax. The site uses the SQL Server syntax so I am curious as to why this will not work. The create table code does work…
Doug Hauf
  • 3,025
  • 8
  • 46
  • 70
3
votes
3 answers

ORA-00933: SQL command not properly ended in insert command

The are many questions with this same title but I can't find an answer among those. What am I doing wrong? CREATE TABLE J (A integer) ; INSERT INTO J (A) VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), …
Clodoaldo Neto
  • 118,695
  • 26
  • 233
  • 260
2
votes
1 answer

How to call stored procedure at sqlfiddle?

I put the following into the Schema panel at sqlfiddle: CREATE TABLE tb_patient ( `idPatient` INTEGER, `prenomPatient` VARCHAR(12), `nomPatient` VARCHAR(6) )// INSERT INTO tb_patient (`idPatient`, `prenomPatient`, `nomPatient`) VALUES …
Barmar
  • 741,623
  • 53
  • 500
  • 612
2
votes
5 answers

MySQL: Replace null with 0 in GROUP_CONCAT

I have a table called trx trx_year trx_month Product number_of_trx 2018 4 A 100 2018 5 A 300 2018 3 A 500 2018 1 A 200 2018 2 A 150 2018 …
Eru
  • 51
  • 8
2
votes
0 answers

SQLite Build Schema not working on sqlfiddle

I am trying to create a simple sqlfiddle in sqlite (websql), but its not working. The sqlfiddle is at Sqlite (websql) Fiddle When I press on the Build Schema button, it goes into the build mode but stays there forever. Also, I don't see any error…
Sunil
  • 20,653
  • 28
  • 112
  • 197
2
votes
1 answer

Oracle User Defined Functions in SQLFiddle

I'm trying to play with Oracle's user defined functions and virtual columns, but my only test environment is SQL Fiddle and I'm struggling to understand what I'm doing wrong as the error message is pretty nondescript. ORA-06575: Package or function…
MatBailie
  • 83,401
  • 18
  • 103
  • 137
2
votes
2 answers

MySQL sporadic MATCH AGAINST behaviour with unique index

When adding a unique key to a multi-table fulltext boolean search, the results cycle through 1 of 3 arbitrary states, with only 1 being correct. Bear this in mind when checking the sqlfiddle below, as the query MAY initially work correctly - in such…
Pinch
  • 61
  • 6
2
votes
2 answers

What is wrong with my SQL code on CONCAT?

CREATE VIEW ‘CustomerView’ AS SELECT FROM ‘Customer’ ORDER BY ‘CustomerID’, CONCAT(‘FirstName,’ ‘ ’, ‘LastName’) AS ‘CustomerName’, ‘StreetAddress’, ‘Apt’, ‘City’, ‘State’, ‘ZipCode’, ‘HomePhone’, ‘MobilePhone’, ‘OtherPhone’ ; I am getting this…
2
votes
2 answers

Stored Procedure timing out

Trying to collect some heirarchical data to send out to a third party, and was directed to this post. After attempting to tweak it to my use case on SQL Fiddle, the stored procedure keeps timing out. So I tried it on locally twice (via…
mOrloff
  • 2,547
  • 4
  • 29
  • 48
2
votes
3 answers

Column alias name doesn't work in SQL fiddle

I am trying to execute a simple query on SQL Fiddle select name as 'user_name' from user_data; But in the output, the column's alias name is not showing. Instead of showing user_name, it is just showing simply as name. But when i print a simple…
Akshay Gupta
  • 361
  • 1
  • 6
  • 17
2
votes
0 answers

Why am I getting this on sqlfiddle.com?

I am a beginner in SQL, and started using this website sqlfiddle.com for practicing. I successfully build schema, but when I try to execute sql queries,sometimes it executes and sometimes i get this error : Oops something went wrong. Try it again…
azemda
  • 79
  • 1
  • 1
  • 8
2
votes
1 answer

Trouble accessing with Procedure in SQLFiddle

I'm building a query in SQLFiddle using SQL Server 2008. This query is a procedure that selects information. I can't post the query itself, but I can post the Syntax surrounding the procedure: CREATE PROCEDURE BusinessInfo @Variable…
user3654055
  • 178
  • 14
1
2
3
9 10