On Tue, Jul 17, 2001 at 03:34:01PM -0500, John Hunter wrote:
> >>>>> "Paul" == Paul DuBois <paul@stripped> writes:
> Paul> ALTER IGNORE this_table ADD PRIMARY KEY (name,time)
> They are not null so this works well with a slight modification:
> ALTER IGNORE TABLE this_table ADD PRIMARY KEY (name,time)
Oops! My mistake.
> One further question. Will this automatically keep my rows ordered by
> the primary key with future inserts?
Umm... no. It will prevent duplicate records from being created, but
you don't have any control over the order in which records are stored.
That's the server's job.
To retrieve records in the order you want to see them, always use ORDER BY.
> Thanks for your help,
> John Hunter