It could be done with a script that looped through all the records and set the field. The tip there would be to start from the last record and loop through to the first:
Go to Record/Request/Page [Last]
Set Field [Flag; If ( Student # = $id; 0; 1 )]
Set Variable [$id; Student #]
Go to Record/Request/Page [Previous; Exit after last]
So that's how it could be done. Beware of record locking issues in a multi-user system.
The next question would be why do you want to do that? I suspect that you may have some reason for flagging records that is part of your solution to some other problem. Did my last post work for you - the one about "average of students top marks"?