- 论坛徽章:
- 0
|
[数据库 外键问题]外键约束错误,不能插入数据,痛苦中!
OK
- /*==============================================================*/
- /* DBMS name: MySQL 4.0 */
- /* Created on: 2005-7-27 16:02:05 */
- /*==============================================================*/
- drop table if exists Phone_otherInfo;
- drop table if exists phone_Phone;
- drop table if exists phone_Zone;
- drop table if exists phone_maker;
- /*==============================================================*/
- /* Table: Phone_otherInfo */
- /*==============================================================*/
- create table Phone_otherInfo
- (
- id int auto_increment not null,
- PhoneID int,
- ParaName varchar(50),
- ParaVaule text,
- classify varchar(50),
- Porder int,
- primary key (id)
- )
- comment = "the optional parameters of phone"
- type = InnoDB;
- /*==============================================================*/
- /* Table: phone_Phone */
- /*==============================================================*/
- create table phone_Phone
- (
- phoneID int auto_increment not null,
- makerID int,
- phoneType varchar(50),
- phoneImage varchar(100),
- forumID int,
- fileName varchar(100),
- commentURL varchar(100),
- primary key (phoneID)
- )
- comment = "table of phone"
- type = InnoDB;
- /*==============================================================*/
- /* Table: phone_Zone */
- /*==============================================================*/
- create table phone_Zone
- (
- ZoneID int auto_increment not null,
- zoneValue varchar(10),
- primary key (ZoneID)
- )
- comment = "zone of the manufacture of the mobile"
- type = InnoDB;
- /*==============================================================*/
- /* Table: phone_maker */
- /*==============================================================*/
- create table phone_maker
- (
- makerID int auto_increment not null,
- makerName varchar(50),
- zoneID int,
- primary key (makerID)
- )
- comment = "the manufacture of the phone"
- type = InnoDB;
复制代码 |
|