I have an user input form with two text fields.
My users can either type in a 'userid' or a 'emailid'.

Based on this two values I need to construct a Java SQL statement,
which will set a flag on the corresponding row, if either one of the input values are available and matches in the db.

The idea of setting a flag is, these flag set rows are for further removal or deletion from the db.

is there a way to to do this?