I am running a script in sql plus, I have a for loop in my script:
BEGIN
FOR count IN 1..100 LOOP
INSERT INTO CompanyShare VALUES (count, 1, 250);
END LOOP;
END;
BEGIN
FOR count IN 101..200 LOOP
INSERT INTO CompanyShare VALUES (count, 2, 50);
END LOOP;
END;
When I run the script this error came up:
ORA-06550: line 6, column 1: PLS-00103: Encountered the symbol “BEGIN”
Where am I going wrong?
Try to add
/afterend;as below: