How to delete multiple records

From: Javanesevn <thanhle(at)sangtao(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: How to delete multiple records
Date: 2006-09-14 06:07:35
Message-ID: 4508F1A7.3040907@sangtao.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Reinoud van Leeuwen 2006-09-14 07:09:29 Re: How to delete multiple records
Previous Message Markus Schaber 2006-09-13 21:44:07 Re: Aggregates with internal state type?