create table customers
(
cid int unsigned not null auto_increment primary key,
name char(50) not null,
city char(100) not null
);create table orders
(
oid int unsigned not null auto_increment primary key,
cid int unsigned not null index idx_cid(cid),
amount float(4,2),
foreign key(cid),
references customers(cid),
on update cascade,
on delete cascade
);
(
cid int unsigned not null auto_increment primary key,
name char(50) not null,
city char(100) not null
); create table orders
(
oid int unsigned not null auto_increment primary key,
cid int unsigned not null index idx_cid(cid),
amount float(4,2),
foreign key(cid) references customers(cid),
on update cascade,
on delete cascade
);
create table customers
(
cid int unsigned not null auto_increment primary key,
`name` char(50) not null,
city char(100) not null
) engine innodb;create table orders
(
oid int unsigned not null auto_increment primary key,
cid int unsigned not null,
index idx_cid(cid),
amount float(4,2),
foreign key(cid) references customers(cid) on update cascade on delete cascade
) engine innodb;
create table customers
(
cid int unsigned not null auto_increment primary key,
`name` char(50) not null,
city char(100) not null
)Type= INNODB CHARACTER SET utf8;create table orders
(
oid int unsigned not null auto_increment primary key,
cid int unsigned not null,
index idx_cid(cid),
amount float(4,2),
foreign key(cid) references customers(cid) on update cascade on delete cascade
)Type= INNODB CHARACTER SET utf8;