私はこのテーブルを持っています:
Create table table1 (
id Int UNSIGNED NOT NULL,
name VARCHAR(255) NOT NULL,
Primary Key(id),
Unique Key `name` (`name`))
ENGINE = InnoDB;
Create table table2 (
id1 Int UNSIGNED NOT NULL,
id2 Int UNSIGNED NOT NULL,
Primary Key (id1,id2))
ENGINE = InnoDB;
Alter table table2 add Foreign Key (id1) references table1 (id)
on delete restrict on update restrict;
Alter table table2 add Foreign Key (id2) references table1 (id)
on delete restrict on update restrict;
で言及されているview
両方のユーザー (から) の名前を含むのタイプを作成する方法はありますか? ご協力いただきありがとうございます。table1
table2