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 819 times.
All times above are in ranch (not your local) time.
The current ranch time is Dec 09, 2018 15:00:04.