pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Javanesevn <thanhle@sangtao.net>
To: pgsql-sql@postgresql.org
Subject: How to delete multiple records
Date: Thu, 14 Sep 2006 15:07:35 +0900
Message-ID: <4508F1A7.3040907@sangtao.net> (raw)

Dear all,

I execute this query on below:

      delete from PRODUCT
      where exists (
           select
                 product_id, item_id
           from PRODUCT
           where
                research_date < '2006-01-01'
     )
this query deleted all records data in PRODUCT table. The subquery 
return only some records.
Tell me about other idea? and What's wrong from this query.

Best regards,

-Javanesevn



view thread (3+ messages)  latest in thread

Message-ID: <4508F1A7.3040907@sangtao.net>
Permalink:  ../4508F1A7.3040907@sangtao.net/
Also on:    postgresql.org/message-id/4508F1A7.3040907@sangtao.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: thanhle@sangtao.net
  Subject: Re: How to delete multiple records
  In-Reply-To: <4508F1A7.3040907@sangtao.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox