Hi,

I have jumped from MySQL to PostgreSQL, and I wanted to know how we
declare that a table depends on another one.

Currently I have 3 tables:

Product(id, title, price)
Item(id, product_id, order_id, quantity)
Order(id, amount, paid)

In pgAdmin I have removed a few order entries, but the items
associated to them are still here, now I have zombie items floating
around that don't belong to any order. So how do I tell PgSQL that
when I remove a given order, it should remove all associated items
also?

Best regards,

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to