Rhino wrote:
First and foremost, thank you very much Michael for correcting my
mistakes; I _was_ a bit sloppy in my reading of the syntax for the
statements and that caused some unnecessary errors in my reply to Scott.
However, your corrections are not _quite_ right even now. See below
where I explain this.
Strange. It was late when I answered, so I actually tested each statement
before posting in an attempt to prevent that.
<snip>
Strangely enough, both of those formulations of the UNIQUE clause fail
for me with the same error as the mistaken version I first proposed in
my note to Scott.
This is the current version of my DROP/CREATE:
drop table if exists Purcell01;
create table if not exists Purcell01
(empno smallint not null,
fname char(10) not null,
lname char(10) not null,
primary key(empno)
-- constraint uk unique index ukix (fname, lname)
-- unique ukix (fname, lname)
) Type=INNODB;
If I run it exactly as shown, with both versions of the UNIQUE clause
commented, it works fine. But if I uncomment either version of the
UNIQUE clause, it fails with the same error I mentioned in my previous
note. I've also tried 'unique(fname, lname)' and that also fails on the
same error.
Did you add the comma after "primary key(empno)" when uncommenting one of the
unique constraint lines? That's the only thing I can see.
Michael
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]