How to set a column as "" (empty string equivalent to NULL in Oracle) when this column is part of a primary key with multiple columns? This is motivation ...
CREATE TABLE entities ( column1 VARCHAR2(10) , column2 VARCHAR2(10) , body VARCHAR2(4000) , CONSTRAINT pk_entities
I usually use a βrealβ primary key as a meaningless sequential identifier (see this question ), and then put a unique constraint on my data columns, like this ...
CREATE TABLE entities ( , id NUMBER PRIMARY KEY , column1 VARCHAR2(10) , column2 VARCHAR2(10) , body VARCHAR2(4000) , CONSTRAINT unq_entities UNIQUE ( column1, column2 ) ) ORGANIZATION INDEX ...
However, this is a large indexed table (IOT), so the primary key should be in the data columns (in the IOT, the data in the index) or ... What should I do?
Thanks! β₯
source share