Subject | Re: [firebird-support] Results of query |
---|---|
Author | Eugen.Konkov@aldec.com |
Post date | 2007-12-26T11:26:48Z |
But I have the first result with latest "Firebird-2.0.3.12981-1-Win32.exe"
Is this a BUG?
Is this a BUG?
----- Original Message -----
From: Helen Borrie
To: firebird-support@yahoogroups.com
Sent: Wednesday, December 26, 2007 1:01 PM
Subject: Re: [firebird-support] Results of query
At 09:18 PM 26/12/2007, you wrote:
>create table test(id int, val char(5));
>insert into test values(1, 'red');
>insert into test values(2, 'green');
>insert into test values(3, 'blue');
>insert into test values(2, 'green');*/
>delete from test
> where test.ID in (select id from test GROUP BY id HAVING count(id)>1);
>What results must be and why?select * from test;id value
>-- -----
>01 red
>02 green
>03 blueORid value
>-- -----
>01 red
>03 blue
The second result is the correct one. Your DELETE query removes all records where the HAVING clause is true, i.e. *both" instances of (2,green).
./heLen
[Non-text portions of this message have been removed]