⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Reflexive/recursive relation, How to manage ?



tyche

tyche
  • profile picture
  • Member

Posted 25 January 2019 - 12:21 PM

How to manage reflexive relation ?

 

create table menu_me
(
   me_id                int not null auto_increment,
   men_me_id            int not null,
   me_libelle           varchar(50),
   me_url               varchar(100),
   primary key (me_id)
);

alter table menu_me add constraint fk_association_1 foreign key (men_me_id)
      references menu_me (me_id) on delete restrict on update restrict;