sql - mysql error: code 1005 cant create table erno 150 -
i have been looking around online, erno 150 seems common problem, struggling code, help?
create table players ( email varchar(30) not null, playerpassword varchar(30), screenname varchar (8), primary key (email) ); create table scores ( screenname varchar(8), gameword varchar(30), score long, foreign key (screenname) references players(screenname) );
screenname
needs key on players table used foreign key in table. can add key (screenname)
table definition players
. maybe want unique key
.