create or replace procedure add_new_classes (p_new_class_no in pls_integer,p_c_id number,p_period varchar2,p_f varchar2,p_i number)
as

BEGIN
for i in 1..p_new_class_no 
loop
insert into classes (class_id, start_date,course_id,period,frequency,instr_id)
values (class_id_sec_car.nextval,sysdate,p_c_id,p_period,p_f,p_i);

end loop;
exception
when others then dbms_output.put_line('o eroare');
END;


begin
add_new_classes(1,1001,'mon','daily',3001);
end;
