我尝试将数据插入表格" school",所以我创建了一个文本文件:
CREATE OR REPLACE PROCEDURE SCHOOL_PRO (id IN NUMBER, name IN VARCHAR2, address IN VARCHAR2, num1 IN INT, num2 IN INT, grade IN INT)
IS
BEGIN
INSERT INTO SCHOOL (ID,NAME,ADDRESS,NUM1,NUM2,GRADE) VALUES (2016001 , 'G' , 'G' , 160 , 0 , 480);
INSERT INTO SCHOOL (ID,NAME,ADDRESS,NUM1,NUM2,GRADE) VALUES (2016010 , 'H' , 'H' , 150 , 0 , 400);
INSERT INTO SCHOOL (ID,NAME,ADDRESS,NUM1,NUM2,GRADE) VALUES (2016011 , 'S' , 'S' , 150 , 0 , 528);
INSERT INTO SCHOOL (ID,NAME,ADDRESS,NUM1,NUM2,GRADE) VALUES (2016101 , 'J' , 'J' , 20 , 0 , 530);
INSERT INTO SCHOOL (ID,NAME,ADDRESS,NUM1,NUM2,GRADE) VALUES (2016110 , 'B' , 'B' , 10 , 0 , 600);
INSERT INTO SCHOOL (ID,NAME,ADDRESS,NUM1,NUM2,GRADE) VALUES (2016111 , 'Q' , 'B' , 10 , 0 , 580);
COMMIT;
END;
/
我执行文本文件,显示procedure created
,然后执行select * from school
并显示no rows selected
。
问题出在哪里?请帮我一把。谢谢!
答案 0 :(得分:0)
您的命令会创建该过程,但不会执行该过程,因此不会向学校插入任何内容。你想要做的是: