[标准SQL的外键约束条件] 1): 子表引用父表的主键 drop table if exists child,parent; create table if not exists parent( id int not null auto_increment primary key, v int ); create table if not exists child( id int not null auto_increment primary key, parent_id int not nu…
MySQL的外键,修改表,基本数据类型,表级别操作,其他(条件,通配符,分页,排序,分组,联合,连表操作): a.创建2张表 create table userinfo(nid int not null auto_increment primary key, name varchar(10), age int, part_nid int )engine=innodb default charset=utf8; create table part( nid int not null auto_in…