2026-03-12 20:23:15

This commit is contained in:
root
2026-03-12 21:23:47 +01:00
parent eab4b36eca
commit 93039b8489
3332 changed files with 699614 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
-- Copyright 2018 Tanel Poder. All rights reserved. More info at http://tanelpoder.com
-- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions.
DROP TABLE t_child;
DROP TABLE t_parent;
CREATE TABLE t_parent(a INT PRIMARY KEY);
CREATE TABLE t_child(b INT, c INT, FOREIGN KEY (c) REFERENCES t_parent(a));
INSERT INTO t_parent SELECT rownum FROM dual CONNECT BY LEVEL<=10;
INSERT INTO t_child SELECT rownum, MOD(rownum,9)+1 FROM dual CONNECT BY LEVEL <= 10;
COMMIT;
PAUSE Press enter to update CHILD table:
PROMPT UPDATE t_child SET c = 10 WHERE c = 1;;
UPDATE t_child SET c = 10 WHERE c = 1;
PROMPT -- In another session run:
PROMPT UPDATE t_parent SET a = 7 WHERE a = 6;;
PROMPT