Citat:
Ursprungligen postat av heyday
Citat:
Men om man själv inte definierar en KEY så kommer MySQL att själv skapa en (i tysthet) om jag inte minns fel eller missförstod manualen.
|
Jag undrar (efter en snabb koll) det inte är namnen på indexarna du menar. Indexet som en Primary key skapar heter PRIMARY, de övriga döper MySQL till _2 eller vad det stod om man inte döper dom själv. Jag tror inte den skapar något index om jag inte vill ha något.
|
<!--QuoteBegin--MySQL Manualen[/i]@14.2.6 CREATE TABLE Syntax
A PRIMARY KEY is a unique KEY where all key columns must be defined as NOT NULL. If they are not explicitly declared as NOT NULL, MySQL will declare them so implicitly (and silently). A table can have only one PRIMARY KEY. If you don't have a PRIMARY KEY and an application asks for the PRIMARY KEY in your tables, MySQL returns the first UNIQUE index that has no NULL columns as the PRIMARY KEY.[/quote]
Vad nog detta jag tänkte på, men minne är inte vad det borde.