Global class BatchApexExam implements database.batchable<Sobject>
{
global database.querylocator start(database.batchablecontext bc){
string query='select id, description from account';
return database.getquerylocator(query);
}
global void execute(database.batchablecontext bc, list<account> acclist){
for(account a: acclist){
a.description='Batchapex';
}
update acclist;
}
global void finish(database.batchablecontext bc){
}
}
{
global database.querylocator start(database.batchablecontext bc){
string query='select id, description from account';
return database.getquerylocator(query);
}
global void execute(database.batchablecontext bc, list<account> acclist){
for(account a: acclist){
a.description='Batchapex';
}
update acclist;
}
global void finish(database.batchablecontext bc){
}
}
No comments:
Post a Comment