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 emp ( id SERIAL PRIMARY KEY, name varchar(50), age int, depart text ); INSERT INTO emp (name, age, depart) VALUES ('tim', 22, 'it'), ('masha', 18, 'striptiz'), ('dasha', 23, 'resnici'); INSERT INTO emp (name, age, depart) VALUES ('vadim', 21, 'it'); select * from emp; select * from emp where age > 20; select * from emp order by age; SELECT COUNT(*) from emp; SELECT ROUND(AVG(age),2) as mean_age from emp; SELECT depart, COUNT(*) FROM emp GROUP BY depart; SELECT depart FROM emp GROUP BY depart HAVING count(*) > 1; SELECT depart, count(*) FROM emp GROUP BY depart; UPDATE emp SET name = 'vasya' WHERE name = 'vadim'; SELECT * from emp e1 JOIN emp e2 ON e1.depart = e2.depart and e1.id < e2.id; SELECT * FROM emp e JOIN (SELECT depart, COUNT(*) FROM emp GROUP BY depart) d ON e.depart = d.depart; CREATE INDEX name_idx ON emp(id); CREATE OR REPLACE FUNCTION func(emp_id INT) RETURNS VARCHAR AS $$ BEGIN RETURN (SELECT name FROM emp WHERE id = emp_id); END; $$ LANGUAGE plpgsql; SELECT func(1) BEGIN; SELECT * from emp; COMMIT;
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
SQLite 3 Preloaded
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