This question might be more towards the approach than the technical side. The scenario is the following:
I have to run a scheduler to delete some records. The record size is always going to be less than 10,000.
Can I retrieve all the results in a list like:
List <sObject> listsObject = [Select Id from sObject where Test__c = true Limit 9000]; Delete listsObject;
Will this be able to delete all the records in the list?! Or will this only delete the 200 records?
Also, I know I could follow the batch Apex Approach but I want to know first if this will work, and if this certainly works I dont have to write Batch Apex and then schedule it.