Hi Michael,
Thanks for that, it looks like it should work fine. I will give it ago :)
Thanks,
Abdul-Wahid
On Fri, 21 Jan 2005 14:59:25 +0100, Michael Kleiser <[EMAIL PROTECTED]> wrote:
> CREATE TABLE cats_items (
> cat_id int4 NOT NULL, item_id int4 NOT NULL, FOREIGN KEY (cat_id)
> REFERENCE
CREATE TABLE cats_items (
cat_id int4 NOT NULL,
item_id int4 NOT NULL,
FOREIGN KEY (cat_id) REFERENCES cats (cat_id),
FOREIGN KEY (item_id) REFERENCES items (item_id),
PRIMARY KEY (cat_id, item_id)
);
CREATE TABLE items_master_cats (
cat_id int4 PRIMARY KEY
item_id int4
Am Freitag, 21. Januar 2005 12:58 schrieb Abdul-Wahid Paterson:
> I have the following table as a link table between my 'cats' table and
> my 'items' table. Every item must have at least one cat and exactly
> one 'master' cat.
>
> How can I create an integrity check to make sure that each item has
Hi,
I have the following table as a link table between my 'cats' table and
my 'items' table. Every item must have at least one cat and exactly
one 'master' cat.
How can I create an integrity check to make sure that each item has
exactly one 'master' cat.
CREATE TABLE cats_items (
cat_id