update only if single row - Mailing list pgsql-sql

From Frank Bax
Subject update only if single row
Date
Msg-id 3.0.6.32.20000406132216.008a8420@execulink.com
Whole thread Raw
Responses Re: update only if single row  ("tjk@tksoft.com" <tjk@tksoft.com>)
List pgsql-sql
Here's the way I do it now:

select * from contact where email ~* 'rvro';
if I get a single row in the result then I enter:
update contact set bounce=1 where  email ~* 'rvro';

Can I combine this into a single SQL statement with the following
requirements:
1) the update is only performed if a single row is selected
2) I only enter the selection string ('rvro' in this case) once in the
command?

Frank


pgsql-sql by date:

Previous
From: Ryan Bradetich
Date:
Subject: Datetime as a time_t?
Next
From: Michael Fork
Date:
Subject: Re: Datetime as a time_t?