sql - In a MySQL db, how to add a new column and make it a primary key? -
in mysql db, how add new column , make primary key? db has 4 columns, 1 of primary key.
alter table foo add column bar int, drop primary key, add primary key(bar); better run in 1 query if table large make things faster.
Comments
Post a Comment