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 tbl_customer( cust_id int auto_increment primary key not null, cust_name varchar(100), cust_registered_date date, cust_credit_limit decimal(12,2) ); INSERT INTO tbl_customer(cust_name, cust_registered_date, cust_credit_limit) VALUES ('JOHN', '2024-02-15', 5000), ('JAMES', '2024-02-15', 6000), ('JANA', '2013-07-11', 4000), ('SHEILA', '1998-11-30', 7000), ('JOSEPH', '1999-08-27', 10000); --select cust_name, date_add(cust_registered_date, INTERVAL 10 day) from tbl_customer; select datediff(MONTH(curdate()), MONTH(cust_registered_date) ) from tbl_customer; SELECT cust_name, DATEDIFF(MONTH, cust_registered_date, CURDATE()) AS months_since_registration; SELECT cust_name, PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM CURDATE()), EXTRACT(YEAR_MONTH FROM cust_registered_date)) AS months_since_registration FROM tbl_customer; SELECT MONTH(curdate()) as 'Month', DAY(curdate()) as 'Day'; SELECT EXTRACT(month from curdate()), EXTRACT(day from curdate()); select date_add(utc_time(), interval 7 hour); SELECT ROUND(cust_credit_limit, 3) FROM tbl_customer; select IFNULL(cust_name, 'unknown') from tbl_customer
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