create database web;
use web;
create table test1(
id int primary key auto_increment;
);
create table test2(
id int primary key auto_increment;
uid int not null;
);
alter table test02 add foreign key(uid) references test1(id);
create database web;
use web;
create table test1(
id int primary key auto_increment;
);
create table test2(
id int primary key auto_increment;
uid int not null;
foreign key(uid) references test1(id);
);