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 Utilisateurs ( utilisateur_id int PRIMARY KEY, nom VARCHAR(50), email VARCHAR(100), mot_de_passe VARCHAR(100), date_inscription DATE ); CREATE TABLE Cartes ( carte_id int PRIMARY KEY, utilisateur_id int REFERENCES Utilisateurs(utilisateur_id), numero_carte VARCHAR(16), date_expiration DATE, code_securite VARCHAR(4) ); CREATE TABLE Commandes ( commande_id int PRIMARY KEY, utilisateur_id int REFERENCES Utilisateurs(utilisateur_id), montant int, date_commande DATE ); CREATE TABLE Transactions ( transaction_id int PRIMARY KEY, commande_id int REFERENCES Commandes(commande_id), montant int, date_transaction DATE, statut VARCHAR(20) ); INSERT INTO Utilisateurs VALUES (1, 'John Doe', 'john.doe@example.com', 'motdepasse123',DATE'2024-02-02'); INSERT INTO Cartes VALUES (1, 1, '1234567812345678', '2025-12-31', '123'); INSERT INTO Commandes VALUES (1, 1, 50.00, DATE'2024-04-04' ); INSERT INTO Transactions VALUES (1, 1, 50.00, DATE'2024-01-01' , 'Réussie'); SELECT * FROM Utilisateurs; SELECT * FROM Cartes WHERE utilisateur_id = 1; SELECT * FROM Commandes WHERE utilisateur_id = 1; SELECT * FROM Transactions WHERE commande_id = 1; CREATE OR REPLACE VIEW Vue_Utilisateurs_Cartes_Transactions AS SELECT utilisateur_id, nom, email, date_inscription FROM Utilisateurs WHERE date_inscription = DATE '2024-02-02'; SELECT * FROM Vue_Utilisateurs_Cartes_Transactions;
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