But I'm not sure why you would use it in your example, as it looks like you're only fetching a few (or just one?) records anyway and not doing any bulk DML with them. And if you are only fetching one record i.e. the Department Name is unique, then you don't need a FOR loop at all.
This thread has been viewed 782 times.
All times above are in ranch (not your local) time.
The current ranch time is Sep 21, 2018 13:45:30.