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 `Customer` ( `customer_number` Int auto_increment, `order_number` Int auto_increment, `fname` varchar(255), `lname` varchar(255), `street_number` Int, `street_name` varchar(255), `city` varchar(255), `state` varchar(255), `zip` Int, `phone_number` varchar(15), `payment_ID` Int, PRIMARY KEY (`customer_number`, `order_number`) ); CREATE TABLE `Driver` ( `driver_ID` Int auto_increment, `fname` varchar(255), `lname` varchar(255), `phone_number` Int, `license_plate` varchar(255), `drivers_license_number` varchar(255), `payment_ID` Int, `order_number` Int, PRIMARY KEY (`driver_ID`, `order_number`) ); CREATE TABLE `Resturant` ( `resturant_number` Int auto_increment, `order_number` Int auto_increment, `name` varchar(255), `payment_ID` Int, `street_number` Int, `street_name` varchar(255), `city` varchar(255), `state` varchar(255), `zip` Int, `phone_number` Int, `cusine` varchar(255), PRIMARY KEY (`resturant_number`, `order_number`) ); CREATE TABLE `Ordered` ( `order_number` Int auto_increment not null, `resturant_number` Int auto_increment, `customer_number` Int auto_increment, `time_stamp` varchar(255), `order_status` varchar(255), `driver_ID` Int, PRIMARY KEY (`order_number`), FOREIGN KEY (`resturant_number`) REFERENCES `Resturant`(`resturant_number`), FOREIGN KEY (`customer_number`) REFERENCES `Customer`(`customer_number`), FOREIGN KEY (`driver_ID`) REFERENCES `Driver`(`driver_ID`) ); insert into Customer(fname, lname, street_number, street_name, city, state, zip, phone_number, payment_ID) values ('April','Ludgate', 123, 'S 55 Ave', 'Omaha', 'NE', 68132, '402-553-4397', 23456); select * from Customer; select * from Driver; select * from Resturant; select * from Ordered;
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