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?
;at the END of first block. And I would not usecountas variable name, as it is a sql reserved word./as parado says.