CREATE DATABASE test;
use test;
CREATE TABLE ddbiao(dingdanhan int,riqi date,spid char primary key);
describe ddbiao;
create table spinfo(spid char primary key,spname char,spprice float);
describe spinfo;
alter table ddbiao add constraint abc foreign key(spid) references spinfo(spid);
describe ddbiao;