show processlist; kill 6924 show full processlist; #列出全部进程 select * from information_schema.PROCESSLIST t; kill 6911 SELECT * FROM information_schema.innodb_trx ORDER BY trx_started ; SELECT * FROM information_schema.innodb_locks; SELECT * FROM info
在Mysql中使用外键,可以有效地将多个表格的数据“联动”起来,打破独立状态,互相影响。
创建表时创建外键
创建两个表格, 一个名为class,
create table classes(
id int not null primary key,
name varchar(30)
);
另一个名为student
create table student(
sid int not null primary key,
sname varchar(30),
cid int not n