mysql - Add (not update) fields into column sql using insert -



mysql - Add (not update) fields into column sql using insert -

i have table:

create table teams (team char(1) primary key, players text); insert teams('a', 'jhon'); insert teams('b', 'mark');

now, how add together player 'carl' in team 'a'?

the column 'players' maybe list?

you do:

insert teams('a', 'carl');

after remove primary key constraint.

actually, want is:

create table teamplayers ( teamplayerid int auto_increment, team char(1), players text );

then inserts want. junction table (sort of). suggests want teams table 1 row per team , players table 1 row per player. depending on application, tables may not necessary.

mysql sql

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -