Insert iterated values from one table to another in OracleDB I'm pretty new in Oracle universe and I need help. I have to iterate through Users Table and insert these 3 specific rows into Task_Group Table. The hard thing to do is to check if these rows even exist (tables are just samples, I need to iterate through a table with a lot of rows), and then insert them only in rows and set Company_Number to: 22. 

Please help, guys!
You can check whether the entry for the user already exists in the table and then exclude that users.

Depending on your data, you can do it with an insert, e.g.

insert into task_group (id, user_id, phone,name, company_no)
select rownum, id, phone,name, 22 
  from users u 
 where not exists(select 1 from task_group t where t.user_id = u.id);


you cann also loop over the data in your cursor and do commit every x Rows, but it is a very slow way to do that