I created a table: CREATE TABLE myTable ( id int GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1, NO CACHE)PRIMARY KEY, pcdurl varchar(2000) NOT NULL )
And I would like to make the pcdurl attribute a unique constraint.
But I get an SQL 633 error. I guess it is because the size exceeds the maximum number allowed. My first question would be what is this number?
Here it says the number is 255-n, where n is the number of columns allowing null values.
But I was also reading on this page: "Maximum combined length of columns in a UNIQUE constraint (supported through a UNIQUE index, in bytes) 8192"
So my second question would be how can I overcome this problem while keeping the attribute as unique key constraint?
Thank you very much in advance