Subject | Re: [firebird-support] Results of query |
---|---|
Author | Helen Borrie |
Post date | 2007-12-26T12:11:50Z |
At 10:26 PM 26/12/2007, you wrote:
Helen
>But I have the first result with latest "Firebird-2.0.3.12981-1-Win32.exe"I think it ought to be....I've sent an ICQ message to Dmitry to take a look. He'll either have an explanation for it, or will ask you to post a Tracker report.
>Is this a BUG?
Helen
> ----- 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]
>
>
>
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>Visit http://www.firebirdsql.org and click the Resources item
>on the main (top) menu. Try Knowledgebase and FAQ links !
>
>Also search the knowledgebases at http://www.ibphoenix.com
>
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>Yahoo! Groups Links
>
>
>