我认为您将需要进行明确的比较。您可以使用 CHECK 约束进行比较,如
CREATE TABLE SOME_TABLE
(COL1 NUMBER,
COL2 NUMBER,
COL3 NUMBER,
COL4 NUMBER,
COL5 NUMBER,
COL6 NUMBER,
COL7 NUMBER,
COL8 NUMBER,
COL9 NUMBER,
COL10 NUMBER,
CONSTRAINT SOME_TABLE_CK1
CHECK(COL1 NOT IN (COL2, COL3, COL4, COL5, COL6, COL7, COL8, COL9, COL10) AND
COL2 NOT IN (COL3, COL4, COL5, COL6, COL7, COL8, COL9, COL10) AND
COL3 NOT IN (COL4, COL5, COL6, COL7, COL8, COL9, COL10) AND
COL4 NOT IN (COL5, COL6, COL7, COL8, COL9, COL10) AND
COL5 NOT IN (COL6, COL7, COL8, COL9, COL10) AND
COL6 NOT IN (COL7, COL8, COL9, COL10) AND
COL7 NOT IN (COL8, COL9, COL10) AND
COL8 NOT IN (COL9, COL10) AND
COL9 NOT IN (COL10)));
分享和享受。