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 clients ( id number(10) primary key, name varchar2(1000), place_of_birth varchar2(1000), date_of_birth date, address varchar2(1000), passport varchar2(100) ); CREATE TABLE products ( id number(10) primary key, product_type_id number(10), name varchar2(100), client_ref number(10), open_date date, close_date date, CONSTRAINT prod_cl_fk FOREIGN KEY (client_ref) REFERENCES clients(id), CONSTRAINT prod_prodtype_fk FOREIGN KEY (product_type_id) REFERENCES product_type(id) ); CREATE TABLE product_type ( id number(10) primary key, name varchar2(100) begin_date date, end_date date, tarif_ref number(10), CONSTRAINT product_type_fk FOREIGN KEY (tarif_ref) REFERENCES tarifs(id) ); CREATE TABLE accounts ( id number(10) primary key, name varchar2(100), saldo number(10,2), client_ref number(10), open_date date, close_date date, product_ref number(10), acc_num varchar2(25), CONSTRAINT acc_cl_fk FOREIGN KEY (client_ref) REFERENCES clients(id), CONSTRAINT acc_prod_fk FOREIGN KEY (product_ref) REFERENCES products(id) ); CREATE TABLE records ( id number(10) primary key, dt number(1), sum(number(10,2), acc_ref number(10), oper_date date, CONSTRAINT rec_acc_fk FOREIGN KEY (acc_ref) REFERENCES accounts(id) ); CREATE TABLE tarifs ( id number(10) primary key, name varchar2(100), cost number (10,2) );
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