Re: Delete Question - Mailing list pgsql-general

From A. Kretschmer
Subject Re: Delete Question
Date
Msg-id 20051207080202.GD13724@webserv.wug-glas.de
Whole thread Raw
In response to Re: Delete Question  ("A.j. Langereis" <a.j.langereis@inter.nl.net>)
List pgsql-general
am  07.12.2005, um  8:54:56 +0100 mailte A.j. Langereis folgendes:
> Postgresql supports records in the where clause i.e. you can compare
> multiple columns simultaneously:
>
> > test=# delete from change where id || ':' || datum not in (select id ||
> ':' || max(datum) from change group by id order by 1);
>
> could therefore be rewritten to:
>
> delete from change where (id, datum) in (select id, max(datum) from change
> group by id);

Oh, thank you!

I have tried this way, but with a wrong syntax.


Andreas
--
Andreas Kretschmer    (Kontakt: siehe Header)
Heynitz:  035242/47212,      D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
 ===    Schollglas Unternehmensgruppe    ===

pgsql-general by date:

Previous
From: "A.j. Langereis"
Date:
Subject: Re: Delete Question
Next
From: Thomas Hallgren
Date:
Subject: Re: Graphical modelling tool