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
DROP VIEW IF EXISTS ‘вирт_Работа с документами’; CREATE VIEW ‘вирт_Работа с документами’ AS SELECT ‘’.’’ AS ‘Регномер работы’, ‘’.’’ AS ‘Дата/время начала’, ‘’.’’ AS ‘Дата/время окончания’, ‘’.’’ AS ‘Код вида работы’, ‘’.’’ AS ‘Название вида работы’, ‘’.’’ AS ‘Код пользователя’, ‘’.’’ AS ‘ФИО пользователя’, ‘’.’’ AS ‘Код должности пользователя’, ‘’.’’ AS ‘Название должности пользователя’, ‘’.’’ AS ‘Код допуска пользователя’, ‘’.’’ AS ‘Название допуска пользователя’, ‘’.’’ AS ‘Ид\Работа с документами’ FROM ‘’ AS ‘’ LEFT JOIN ‘’ AS ‘’ ON ‘’.’’ = ‘’.’’; SELECT*FROM ‘вирт_Работа с документами’; DROP PROCEDURE IF EXISTS ‘проц_Документ в работе’; CREATE PROCEDURE ‘проц_Документ в работе’ (IN ‘@Ид\Работа с документами’ INT) SELECT ‘’.’’ AS ‘Основание для выдачи’, ‘’.’’ AS ‘Дата/время выдачи’, ‘’.’’ AS ‘Дата/время возврата’, ‘’.’’ AS ‘Регномер документа’, ‘’.’’ AS ‘Название документа’, ‘’.’’ AS ‘Код грифа секретности’, ‘’.’’ AS ‘Код вида документа’, ‘’.’’ AS ‘Название вида документа’, ‘’.’’ AS ‘Код ответственного’, ‘’.’’ AS ‘ФИО ответственного’, ‘’.’’ AS ‘Код хранителя’, ‘’.’’ AS ‘ФИО хранителя’ FROM ‘’ AS ‘’ LEFT JOIN ‘’ AS ‘’ ON ‘’.’’ = ‘’.’’ WHERE ‘’.’’ = ‘@Ид\Работа с документами’; SELECT*FROM ‘вирт_Работа с документами’; CALL ‘проц_Документ в работе’ (1); DROP PROCEDURE IF EXISTS ‘проц_Поручение’; CREATE PROCEDURE ‘проц_Поручение’ (IN ‘@Ид\Работа с документами’ INT) SELECT ‘’.’’ AS ‘Регномер поручения’, ‘’.’’ AS ‘Содержание поручения’, ‘’.’’ AS ‘Код вида поручения’, ‘’.’’ AS ‘Название вида поручения’, ‘’.’’ AS ‘Код пользователя’, ‘’.’’ AS ‘ФИО пользователя’, ‘’.’’ AS ‘Код техника’, ‘’.’’ AS ‘ФИО техника’ FROM ‘’ AS’’ LEFT JOIN ‘’ AS ‘’ ON ‘’.’’ = ‘’.’’ WHERE ‘’.’’ = ‘@Ид\Работа с документами’; SELECT*FROM ‘вирт_Работа с документами’; CALL ‘проц_Поручение’ (1); DROP VIEW IF EXISTS ‘вирт_Работа%Документ’; CREATE VIEW ‘вирт_Работа%Документ’ AS SELECT ‘’.’’ AS ‘Регномер работы’, ‘’.’’ AS ‘Дата/время начала’, ‘’.’’ AS ‘Дата/время окончания’, ‘’.’’ AS ‘Код вида работы’, ‘’.’’ AS ‘Название вида работы’, ‘’.’’ AS ‘Код пользователя’, ‘’.’’ AS ‘ФИО пользователя’, ‘’.’’ AS ‘Код должности пользователя’, ‘’.’’ AS ‘Название должности пользователя’, ‘’.’’ AS ‘Код допуска пользователя’, ‘’.’’ AS ‘Название допуска пользователя’, ‘’.’’ AS ‘Ид\Работа с документами’, ‘’.’’ AS ‘Основание для выдачи’, ‘’.’’ AS ‘Дата/время выдачи’, ‘’.’’ AS ‘Дата/время возврата’, ‘’.’’ AS ‘Регномер документа’, ‘’.’’ AS ‘Название документа’, ‘’.’’ AS ‘Код грифа секретности’, ‘’.’’ AS ‘Код вида документа’, ‘’.’’ AS ‘Название вида документа’, ‘’.’’ AS ‘Код ответственного’, ‘’.’’ AS ‘ФИО ответственного’, ‘’.’’ AS ‘Код хранителя’, ‘’.’’ AS ‘ФИО хранителя’ FROM ‘’ AS ‘’ LEFT JOIN ‘’ AS ‘’ ON ‘’.’’ = ‘’.’’; SELECT*FROM ‘вирт_Работа%Документ’; DROP VIEW IF EXISTS ‘вирт_Исполненное поручение’; CREATE VIEW ‘вирт_Исполненное поручение’ AS SELECT ‘’.’’ AS ‘Регномер акта’, ‘’.’’ AS ‘Дата составления’, ‘’.’’ AS ‘Код техника’, ‘’.’’ AS ‘ФИО техника’, ‘’.’’ AS ‘Код пользователя’, ‘’.’’ AS ‘ФИО пользователя’, ‘’.’’ AS ‘Код допуска пользователя’, ‘’.’’ AS ‘Код ответственного’, ‘’.’’ AS ‘ФИО ответственного’, COUNT (*) AS ‘Число выполненных поручений’ FROM ‘’ AS ‘’ LEFT JOIN ‘’ AS ‘’ ON ‘’.’’ = ‘’.’’ GROUP BY ‘’.’’; SELECT*FROM ‘вирт_Исполненное поручение’;
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