At 6:06 PM -0700 2000-07-30, henrydesiato@stripped wrote:
> -----Original Message-----
> > -----Original Message-----
> > Hi,
> > "Actually, I can't. Do you mean that index_name is a separate column
> > just an alias for index_col_name? The manual does have a line for
> > x
> > of UNIQUE but it never explains it!"
> > Well all it means is that you can specify a name for the index. It's
> > optional because in itself it doesn't do anything. Really it's for
> > convenience as much as anything.
> > "Also, optional doesn't necessarily mean implied. In fact, are you
> > that UNIQUE implies INDEX?"
> > Yes, a unique one. To perhaps confuse things, so does KEY (KEY is a
> > synonym for INDEX).
> > Hmm, I'm not convinced. I'd think the opposite would be preferable in
> >order to allow a column to be defined as UNIQUE without it being an
> >Then again, you might be right but not because of what can be found in
> To ensure that column values are UNIQUE would be horribly inefficient
> if the column were not indexed. You'd have to do a full table scan
> every time you added or modified a column value.
> Agreed but that still doesn't prove anything.
Uh ... what? What are you expecting to be "proved"? You were positing
that the MySQL CREATE TABLE syntax should mean something other than what
it *does* mean. And to say that you can't determine that UNIQUE refers
to an index by reading the documentation is simply silly. The CREATE TABLE
section says that "INDEX" and "KEY" are synonymous, and it connects "UNIQUE"
with keys. It doesn't appear to me that the documentation allows an
interpretation of UNIQUE outside of a key/index context.
I can see that the manual might not have an immediately obvious meaning
if you don't know what an index is, but if you do, it's reasonably clear.
Paul DuBois, paul@stripped