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 Artist ( ArtistID int, FName varchar (32), LName varchar(32), ADD constraint PK_Artist Primary key (ArtistID) ); Create table song ( SongID int, ArtistID int, Title varchar(45), Duration DOUBLE (1,2) ); Alter table song ADD (constraint PK_Song Primary key SongID) ADD (constraint FK_ArtistPK Foreign key (ArtistID) References Artist (artistID) ); Create table Playlist (PlaylistID int, SongID int Name varchar(40) ); Alter table Playlist ADD (constraint PK_playlist Primary key playlistID) ADD (constraint FK_SongPK Foreign key (SongID) References Song (SongID) ); Create table Album ( AlbumID int, SongID int, Name varchar (40) Year Released year (4), Genre varchar (30) ); Alter table album ADD(constraint PK_Album Primary key AlbumID) ADD (Constraint FK_SongFK Foreign key (SongID) References Song (SongID) ); Create table artist_song ( ArtistID int SongID int ); Alter table album ADD(constraint PK_artistsong Primary key ArtistID) ADD (Constraint FK_SongFK Foreign key (SongID) References Song (SongID) );
SQL
Server:
MySQL 5.7
MySQL 5.7 Sakila (ReadOnly)
MySQL 8.0
MySQL 8.0 Sakila (ReadOnly)
MariaDB 11.5
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