Hi! Could we please enable some services and cookies to improve your experience and our website?

SQLize | PHPize | SQLtest

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

A A A
Login    Share code      Blog   FAQ
Copy Format Clear
create table test_w (ID int, NAME varchar(50), PARENT int, STATUS int, OWN_ANSWER int); ------------------------------------------------------ insert into test_w values (30, 'Проблема Hardware', null, 1, 0); insert into test_w values (31, 'Вышел из строя ко', 30, 1, 0); insert into test_w values (32, 'Вышел из строя м', 30, 1, 0); insert into test_w values (37, 'Проблема Software', null, 1, 0); insert into test_w values (38, 'Сбой маршрутизации', 37, 1, 0); insert into test_w values (39, 'Петля/Флуд', 37, 1, 0); insert into test_w values (42, 'ВОЛС', null, 1, 0); insert into test_w values (43, 'Обрыв ВОЛС', 42, 1, 0); insert into test_w values (44, 'Битый патч-корд/р', 42, 1, 0); insert into test_w values (46, 'Факторы внешней с', null, 1, 0); ----------------------------------------------------- CREATE OR REPLACE VIEW V_REF_22_227_FN_REASON AS select LEVEL AS level_id, ID AS reason_id, NAME AS reason_desc, PARENT AS reason_parent, status, own_answer from test_w r START WITH PARENT IS NULL CONNECT BY r.PARENT = PRIOR r.ID ---------------------------------------------------- select * from V_REF_22_227_FN_REASON

Stuck with a problem? Got Error? Ask AI support!

Copy Clear