CREATE TABLE Master (
Code NUMBER,
Field1 VARCHAR(100),
Field2 VARCHAR(100),
Field3 VARCHAR(100)
);
CREATE TABLE Detail (
Code NUMBER,
Master NUMBER,
Field1 VARCHAR(100),
Field2 VARCHAR(100)
);
CREATE TABLE Loaded (
Code NUMBER,
Field1 VARCHAR(100),
Field2 VARCHAR(100),
Field3 VARCHAR(100),
Field4 VARCHAR(100),
Field5 VARCHAR(100)
);
declare
i INTEGER;
begin
for i in 1..1000 loop
INSERT INTO Master (
Code,
Field1,
Field2,
Field3)
VALUES (
i,
'01234567890123456789',
'12345678901234567890',
'23456789012345678901');
end loop;
for i in 1..10000 loop
INSERT INTO Detail (
Code,
Master,
Field1,
Field2)
VALUES (
i,
mod(i,1000) + 1,
'01234567890123456789',
'12345678901234567890');
end loop;
COMMIT;
end;
/
CREATE INDEX Detail_IND ON Detail (Master);
/
CREATE OR REPLACE
PROCEDURE Master_Insert (
p_Code NUMBER,
p_Field1 VARCHAR2,
p_Field2 VARCHAR2,
p_Field3 VARCHAR2
)
is
begin
NULL;
end;
/ |