Re: [SQL] checking data integrity in a recursive table
Luke Pascoe wrote: > Hi, I have a table that references itself to create a tree-like structure, > eg: > CREATE TABLE tree ( > id SERIAL NOT NULL, > name VARCHAR(255) NOT NULL, > parent INT NULL, > customer IN NOT NULL, > CONSTRAINT parent_key... >
[SQL] checking data integrity in a recursive table
Hi, I have a table that references itself to create a tree-like structure, eg: CREATE TABLE tree ( id SERIAL NOT NULL, name VARCHAR(255) NOT NULL, parent INT NULL, customer IN NOT NULL, CONSTRAINT parent_key... CONSTRAINT customer_fk FOREIGN