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
-- Отключение проверок внешних ключей (если необходимо) PRAGMA foreign_keys = OFF; -- Удаление существующих таблиц, если они есть DROP TABLE IF EXISTS bank_transactions; DROP TABLE IF EXISTS cashbox_transactions; -- Включение проверок внешних ключей PRAGMA foreign_keys = ON; -- Создание таблицы bank_transactions CREATE TABLE bank_transactions ( id INTEGER PRIMARY KEY AUTOINCREMENT, client_id INTEGER, date DATETIME, amount NUMERIC(10, 2) ); -- Создание таблицы cashbox_transactions CREATE TABLE cashbox_transactions ( id INTEGER PRIMARY KEY AUTOINCREMENT, client_id INTEGER, date DATETIME, amount NUMERIC(10, 2) ); -- Вставка данных в таблицу bank_transactions INSERT INTO bank_transactions (id, client_id, date, amount) VALUES (1, 12, '2017-02-01 11:35:17', '560.00'), (2, 56, '2017-02-03 15:43:18', '3000.00'), (3, 124, '2017-02-14 12:12:02', '1400.50'); -- Вставка данных в таблицу cashbox_transactions INSERT INTO cashbox_transactions (id, client_id, date, amount) VALUES (1, 56, '2017-02-04 10:12:09', '74.00'), (2, 451, '2017-02-10 22:12:04', '871.00'), (3, 98, '2017-02-16 09:00:30', '1000.00'); -- Объединение таблиц bank_transactions и cashbox_transactions SELECT id, client_id, date, amount FROM bank_transactions UNION SELECT id, client_id, date, amount FROM cashbox_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
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