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 staffinfo ( emp_id INT, emp_nm VARCHAR(50), birth_dt DATE, start_dt DATE, end_dt DATE ); INSERT INTO staffinfo (emp_id, emp_nm, birth_dt, start_dt, end_dt) VALUES (1, 'Ivanov', '1983-01-23', '2013-05-01', '2022-05-20'); INSERT INTO staffinfo (emp_id, emp_nm, birth_dt, start_dt, end_dt) VALUES (2, 'Petrov', '1985-02-20', '2014-01-23', '2021-06-22'); INSERT INTO staffinfo (emp_id, emp_nm, birth_dt, start_dt, end_dt) VALUES (3, 'Sidorov', '1980-04-01', '2015-05-05', NULL); INSERT INTO staffinfo (emp_id, emp_nm, birth_dt, start_dt, end_dt) VALUES (4, 'Petrov', '2003-01-23', '2024-02-02', NULL); INSERT INTO staffinfo (emp_id, emp_nm, birth_dt, start_dt, end_dt) VALUES (5, 'Vetrov', '2001-05-08', '2023-01-24', NULL); select * from staffinfo; select emp_id, emp_nm, case when extract(month from birth_dt) = 1 then birth_dt when extract(month from start_dt) = 1 then start_dt end as celebrate_dt from staffinfo where (extract(month from birth_dt)= 1 or extract(month from start_dt) = 1) and end_dt is null; select max (emp_id) form staffinfo;
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