clear markdown compare help best fiddles feedback dbanow.uk a leap of faith?
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 1451350 fiddles created (18684 in the last week).

PRAGMA foreign_keys = ON
 hidden batch(es)


CREATE TABLE TableA ( id INTEGER primary key , name varchar )
 hidden batch(es)


CREATE TABLE TableC ( id INTEGER primary key, name varchar )
 hidden batch(es)


CREATE TABLE TableB ( id INTEGER primary key, issues varchar, tb_aid INTEGER, tb_cid INTEGER , CONSTRAINT fk_TBLC FOREIGN KEY (tb_cid) REFERENCES TableC(id) ON DELETE CASCADE, CONSTRAINT fk_TBLA FOREIGN KEY (tb_aid) REFERENCES TableA(id) ON DELETE CASCADE )
 hidden batch(es)


INSERT INTO TableA(id,name) VALUES(1,'test')
 hidden batch(es)


INSERT INTO TableC(id,name) VALUES(1,'test')
 hidden batch(es)


INSERT INTO TableB(id,issues,tb_aid,tb_cid) VALUES(1,'test',1,1)
 hidden batch(es)


DELETE FROM TableA where id = 1
 hidden batch(es)


SELECT * FROM TableB
id issues tb_aid tb_cid
 hidden batch(es)