SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
CREATE TABLE test ( id int primary key, first_name VARCHAR(20), last_name VARCHAR(30) ); insert into test (id) values (1), (2), (3); CREATE TABLE ref1 ( id int primary key, test_id int references test(id) ); insert into ref1 (id, test_id) values (1, 1); delete from test where id = 1; CREATE TABLE ref2 ( id int primary key, test_id int, foreign key (test_id) references test(id) ); insert into ref2 (id, test_id) values (1, 2); delete from test where id = 2; select * from test;

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear