Errno 150,创建没有外键的表

时间:2015-03-12 19:28:16

标签: mysql sql key constraints

CREATE TABLE uhc
(
    id_uhc      int         not null        AUTO_INCREMENT,
    maxplayers  smallint    not null        DEFAULT 80,
    tostimc     bit(1)      not null        DEFAULT 1,  
    nether      bit(1)      not null        DEFAULT 0,
    host_name   varchar(20) not null,
primary key (id_uhc) );

1005 - 无法创建表'tostimc.uhc'(错误号:150)

我唯一拥有的是主键,在我看来,这不是错误的。我之前确实有一张外键,但是我删掉了那张。 (显示表格既不显示表格)

REPAIR TABLE uhc:

Table 'tostimc.uhc' doesn't exist

DROP TABLE uhc:

1051 - Unknown table 'uhc'

查询在新数据库上工作正常,它只对我们的生产数据库不起作用,值得一提的是:我们有一个带有外键的表但我们放弃了那个... 我只是无法找出我做错了什么,有人可以帮助我,谢谢!

0 个答案:

没有答案
相关问题