I'd just like to clarify something pretty simple regarding single and composite
UNIQUE constraints that I can't find a clear answer to.
Assume I have the following table:
CREATE TABLE person ( id INT PRIMARY KEY, customer_id INT NOT NULL UNIQUE, name VARCHAR(20) NOT NULL ... )
Would it be safe to say that adding the following constraint:
would be redundant and offer no benefit under any circumstance? In other words, is it useless to create a composite
UNIQUE constraint that includes a column which is already
This appears to make logical sense, but as I stated, I couldn't find an answer confirming it.