문제

When running the follow query i receive the error below, Im just trying to create this simple table with no FK or anything and still receive this error. What could be the cause? SQL query:

CREATE TABLE `xauction`.`orders` (
`id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
`type` VARCHAR( 1 ) NOT NULL ,
PRIMARY KEY ( `id` )
) ENGINE = InnoDB;

MySQL said: Documentation

1005 - Can't create table 'xauction.orders' (errno: 150) (Details...)

도움이 되었습니까?

해결책

Try show innodb status. Within the big chunk of data it outputs, there's a section that'll have more details than the normal error message you get from the original error-causing query.

다른 팁

the syntax is o.k

from mysql site :

. If the error message refers to error 150, table creation failed because a foreign key constraint was not correctly formed

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top