create table users (id int primary key auto_increment,nikename varchar(20) not null unique,password
varchar(100) not null,address varchar(200), reg_date timestamp not null default CURRENT_TIMESTAMP);
--2 建articles表,在建表时设置外键
create table articles (id int primary key auto_increment,content longtext not null,userid int,constraint
foreign key (userid) references users(id) on delete set null);