I am running the statement in the Debug->Open Execute Anonymous Window option. I am trying to insert more than 150 Account records
List<Account> accounts = new List<Account>();
for(Integer i = 0; i < 200; i++)
{
Account account = new Account(Name = 'Test Account');
accounts.add(account);
}
insert accounts; // insert list - counts as 1 DML statement.
But i get the error:
System.LimitException: Too many DML statements: 151
Is there a way i can do this ?