I am trying to create a FOR loop which inserts 1000 employees into the employee table. It's ok if they have the same name but the other 3 values must have different values. I need the emp_id to insert the 1000 employees from 307_1307, have the manager emp_id either 304 or 305(randomly chosen) and the salary between 22,000 and 200,000(randomly chosen). How would I go about doing this and how would I assign the sequence to be the primary key i.e the emp_id going from 307 to 1307?
CREATE SEQUENCE seq6
START WITH 307
INCREMENT BY 1
CACHE 10
NOCYCLE;
BEGIN
FOR i IN 1..1000 LOOP
INSERT INTO EMPLOYEE (EMP_ID, FNAME, LNAME, MANAGER_EMP_ID, salary) VALUES('307 - 1307','tommy', 'walsh', '304 or 305', 'between 22000 and 200,000');
END LOOP;
END;
/
Any ideas?