a1exlism
10/25/2016 - 2:42 AM

MySQL_multi_primary_key.sql

-- from: http://www.jb51.net/article/21382.htm

-- ①创建时:

create table sc ( 
studentno int, 
courseid int, 
score int, 
primary key (studentno,courseid) ); 
-- ②修改时:a
alter table tb_name add primary key (字段1,字段2,字段3);