SQLize
Online
/
PHPize Online
/
SQLtest Online
A
A
A
Share
Donate
Blog
Popular
Donate
A
A
A
Share
Blog
Popular
SQLize.online is a free online SQL environment for quickly running, experimenting with and sharing code.
You can run your SQL code on top of the most popular RDBMS including MySQL, MariaDB, SQLite, PostgreSQL, Oracle and Microsoft SQL Server.
SQL code:
Upload
Copy
Format
Clear
CREATE TABLE city_population ( state VARCHAR(50), city VARCHAR(50), population INT ); INSERT INTO city_population (state, city, population) VALUES ('haryana', 'ambala', 100); INSERT INTO city_population (state, city, population) VALUES ('haryana', 'panipat', 200); INSERT INTO city_population (state, city, population) VALUES ('haryana', 'gurgaon', 300); INSERT INTO city_population (state, city, population) VALUES ('punjab', 'amritsar', 150); INSERT INTO city_population (state, city, population) VALUES ('punjab', 'ludhiana', 400); INSERT INTO city_population (state, city, population) VALUES ('punjab', 'jalandhar', 250); INSERT INTO city_population (state, city, population) VALUES ('maharashtra', 'mumbai', 1000); INSERT INTO city_population (state, city, population) VALUES ('maharashtra', 'pune', 600); INSERT INTO city_population (state, city, population) VALUES ('maharashtra', 'nagpur', 300); INSERT INTO city_population (state, city, population) VALUES ('karnataka', 'bangalore', 900); INSERT INTO city_population (state, city, population) VALUES ('karnataka', 'mysore', 400); INSERT INTO city_population (state, city, population) VALUES ('karnataka', 'mangalore', 200) ; CREATE TABLE EmployeeJobHistory ( EmployeeID INT, EmployeeName VARCHAR(50), CompanyName VARCHAR(100), StartDate DATE, EndDate DATE, IsCurrentOrganization BIT ); INSERT INTO EmployeeJobHistory (EmployeeID, EmployeeName, CompanyName, StartDate, EndDate, IsCurrentOrganization) VALUES (1, 'Alice', 'Company A', '2020-01-01', '2021-12-31', 0), (1, 'Alice', 'Company B', '2022-01-01', NULL, 1), -- Alice is currently working at Company B (2, 'Bob', 'Company C', '2018-06-01', '2019-05-31', 0), (2, 'Bob', 'Company D', '2019-06-01', '2022-11-30', 0), (2, 'Bob', 'Company E', '2023-01-01', NULL, 1), -- Bob is currently working at Company E (3, 'Charlie', 'Company F', '2018-03-01', NULL, 1), -- Charlie is currently working at Company F (4, 'Diana', 'Company G', '2005-09-01', '2010-08-31', 0), (4, 'Diana', 'Company H', '2010-09-01', '2015-12-31', 0), (4, 'Diana', 'Company I', '2016-01-01', '2020-02-29', 0), (4, 'Diana', 'Company J', '2020-03-01', NULL, 1); -- Diana is currently working at Company J create procedure p1_name as begin -- print unique name select * from Employeejobhistorey; end exec p1_name
SQL
Server:
MariaDB 11.4
MariaDB 11.5
MariaDB 10
MariaDB 10 Sakila (ReadOnly)
MySQL 5.7
MySQL 5.7 Sakila (ReadOnly)
MySQL 8.0
MySQL 8.0 Sakila (ReadOnly)
SQLite 3
PostgreSQL 10 Bookings (ReadOnly)
PostgreSQL 11
PostgreSQL 12
PostgreSQL 13
PostgreSQL 14
PostgreSQL 15
MS SQL Server 2017
MS SQL Server 2019
MS SQL Server 2022
MS SQL Server 2022 AdventureWorks (ReadOnly)
Firebird 4.0
Firebird 4.0 (Employee)
Oracle Database 19c (HR)
Oracle Database 21c
Oracle Database 23c Free
SOQOL
Version
ER Diagram
Preserve result
Stuck with a problem?
Got Error?
Ask ChatGPT!
Result:
Copy
Clear