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 users ( username VARCHAR(100), password VARCHAR(100), hash VARCHAR(255) ); INSERT INTO users(username, password, hash) VALUES ('evan', 'goodpassword', 'wodv0vnwejgf0844nfg8rfn'); INSERT INTO users(username, password, hash) VALUES ('mark', 'password', 'hwoenfoveb313jsojf'); INSERT INTO users(username, password, hash) VALUES ('mike', 'password1', 'hwoenf353463456gff'); CREATE TABLE customers ( customer VARCHAR(100), id INT ); INSERT INTO customers(customer, id) VALUES ('Toyota', 1); INSERT INTO customers(customer, id) VALUES ('Honda', 2); CREATE TABLE music ( [ID] INT NOT NULL IDENTITY(1,1), [ArtistName] VARCHAR(50) NOT NULL, [AlbumName] VARCHAR(50) NOT NULL, [ReleaseYear] INT NOT NULL, CONSTRAINT [PK_Music] PRIMARY KEY ([ID] ASC) ); INSERT INTO music(ArtistName, AlbumName, ReleaseYear) VALUES ('Beach Boys', 'Sunflower', 1970); INSERT INTO music(ArtistName, AlbumName, ReleaseYear) VALUES ('Beatles', 'Abbey Road', 1969); SELECT * FROM MUSIC WHERE ArtistName='Beatles'; SELECT * FROM MUSIC WHERE ArtistName='' SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME > 'music'; SELECT * FROM MUSIC WHERE ArtistName='Beatles' UNION select 2 AS ID, STRING_AGG(table_name, ' ') COLLATE Latin1_General_CI_AS AS ArtistName, '3' AS AlbumName, 2000 AS ReleaseYear from information_schema.tables WHERE TABLE_NAME > 'a'; SELECT * FROM MUSIC WHERE ArtistName='' UNION SELECT 50, STRING_AGG(username, ' ') COLLATE Latin1_General_CI_AS, '3', 2000 FROM users WHERE username > ' '; SELECT name, type_desc FROM sys.database_principals WHERE type IN ('S', 'U'); EXEC sp_addrolemember 'admin', 'guest'; SELECT dp.name AS UserName, dp.type_desc AS UserType, dr.name AS RoleName FROM sys.database_principals AS dp JOIN sys.database_role_members AS drm ON dp.principal_id = drm.member_principal_id JOIN sys.database_principals AS dr ON drm.role_principal_id = dr.principal_id WHERE dp.name = 'guest';
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