views:

28

answers:

2

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...)

A: 

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

Haim Evgi
That's wierd because i have no FK constraints on this table should I check other tables to make sure everything is ok?
William Smith
yes its very weird , i success to run your query.
Haim Evgi
I wonder how i should proceed with this, is there a way make the FK constraints display ?
William Smith
+1  A: 

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.

Marc B
Thank you gave me a detailed error to fix the issue
William Smith