db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John English <john.fore...@gmail.com>
Subject Re: Unique constraints and nulls
Date Sat, 17 May 2014 11:16:30 GMT
On 15/05/2014 10:46, Dyre Tjeldvoll wrote:
> Could you not do
>
> DELETE FROM FOO WHERE A = ? AND ( B = ? OR B IS NULL )

Unfortunately not. If B is not null, it would also delete the corresponding A 
where B is null. For example:
    A = X, B = Y
    A = X, B = NULL
Your solution would delete both, but I want to delete ONLY the row with the 
matching value for B.

But thanks for trying!
-- 
John English

Mime
View raw message