資料表更改為多個primary key,

URL Link //n.sfs.tw/12189

2018-02-09 15:26:54 By igogo

 

MariaDB [database]> describe TABLENAME;

 

想由本來是兩個PRIMARY KEY 更改為 三個

 MariaDB [database]>ALTER TABLE items DROP INDEX `PRIMARY`, ADD PRIMARY KEY (FIELD1, FIELD2,FIELD3);