2026-03-12 20:51:59

This commit is contained in:
2026-03-12 21:51:59 +01:00
parent 92a93d2634
commit 4c51d00919
35 changed files with 1925 additions and 0 deletions

30
divers/tmp_script.sql Normal file
View File

@@ -0,0 +1,30 @@
CREATE TABLE exemple_table (
col1 INTEGER,
col2 INTEGER,
col3 INTEGER,
col4 VARCHAR2(20)
);
DECLARE
v_col1 INTEGER;
v_col2 INTEGER;
v_col3 INTEGER;
v_col4 VARCHAR2(20);
BEGIN
FOR i IN 1..1000000 LOOP
v_col1 := TRUNC(DBMS_RANDOM.VALUE(1, 1000));
v_col2 := TRUNC(DBMS_RANDOM.VALUE(1, 1000));
v_col3 := TRUNC(DBMS_RANDOM.VALUE(1, 1000));
v_col4 := DBMS_RANDOM.STRING('U', 10); -- 10 caractères aléatoires en majuscules
INSERT INTO exemple_table (col1, col2, col3, col4)
VALUES (v_col1, v_col2, v_col3, v_col4);
-- Commit toutes les 10 000 lignes pour éviter les problèmes de mémoire
IF MOD(i, 10000) = 0 THEN
COMMIT;
END IF;
END LOOP;
COMMIT;
END;
/