Re: From select to delete

From: Alexander Farber <alexander(dot)farber(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: From select to delete
Date: 2011-10-28 16:50:04
Message-ID: CAADeyWgXrEZuuZpL6WAc_z5-HXCN9pP_7oY1gdEh7hM5=HLNCQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Nevermind, sorry - I've figured it out myself (for a change)

delete from pref_scores where id<>_id and gid in
(select gid from pref_scores where id=_id);

delete from pref_games where gid in
(select gid from pref_scores where id=_id);

delete from pref_scores where id=_id;

Regards
Alex

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2011-10-28 16:59:04 Re: nextval skips values between consecutive calls
Previous Message Alexander Farber 2011-10-28 16:41:06 Re: From select to delete