I've heard that we should avoid using
CREATE UNIQUE INDEX indx ON tbl(clmn)
because in fact it creates a UNIQUE
constraint without naming it so in a contraints table. But What is the different? If we use
ALTER TABLE tbl ADD CONSTRAINT un_cn UNIQUE(clmn)
we create a consraint, but it also creates an index on clmn
we don't explicitly name.
So why is the second form preffered?