home / shop

product_categories

Many-to-many link between products and categories

5 rows where product_id = "kj8j96t0e1"

✎ View and edit SQL

This data as json, CSV (advanced)

Link product_id category_id
kj8j96t0e1,2 Snowball kj8j96t0e1 Christmas 2
kj8j96t0e1,18 Snowball kj8j96t0e1 White 18
kj8j96t0e1,51 Snowball kj8j96t0e1 Bouquets 51
kj8j96t0e1,60 Snowball kj8j96t0e1 Winter 60
kj8j96t0e1,63 Snowball kj8j96t0e1 Fresh Cut Flowers 63

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE product_categories (
    product_id TEXT NOT NULL,
    category_id INTEGER NOT NULL,
    PRIMARY KEY (product_id, category_id),
    FOREIGN KEY (product_id) REFERENCES products(id),
    FOREIGN KEY (category_id) REFERENCES categories(id)
);
Powered by Datasette · Queries took 6.81ms