Ok but is it still suggested to have a for each loop even for 500 tables?? 

Also if one of the table fails in the loop I think it would be difficult to go over all the 500 tables.