please tell me how can i exclusively lock rows returned by a select statement in a transaction so that another transaction cannot fire a select query untill the first transaction completes. and the rows which are not returned by the select statement remain unlocked

when i use select...for update still another transaction can read the locked rows