阅读背景:

显示使用外键创建表的错误

来源:互联网 
CREATE TABLE location (
  uid int not null auto_increment primary key,
  name varchar(255) NOT NULL,
  `state_uid` int not null,
  FOREIGN KEY location(state_uid)
  REFERENCES state(uid)
  ON UPDATE CASCADE
  ON DELETE RESTRICT,
  `city_uid` int not null,
  FOREIGN KEY location(city_uid)
  REFERENCES city(uid)
  ON UPDATE CASCADE
  ON DELETE RESTRICT,
  `area_uid` int not null,
  FOREIGN KEY location(area_uid)
  REFERENCES area(uid)
  ON UPDATE CASCADE
  ON DELETE RESTRICT
);
CREATE TABLE location (
  uid int not null auto



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: