Skip to content

Instantly share code, notes, and snippets.

@lsfalimis
Created September 3, 2014 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lsfalimis/d8542ff2ecb8cbd75373 to your computer and use it in GitHub Desktop.
Save lsfalimis/d8542ff2ecb8cbd75373 to your computer and use it in GitHub Desktop.
relational table, mysql
create table one_mul_map (
id_a int unsigned not null default '0',
id_b int unsigned not null default '0',
primary key (id_a,id_b),
key mfk (id_b),
constraint ofk foreign key (id_a) references one (id),
constraint mfk foreign key (id_b) references mul (id)
) engine = innodb;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment