I wasn't on the list when the thread below started, but I saw it on google
and wanted to add some more information, but this time, my columns aren't
char based and I get the same error. Here's my SQL:
CREATE TABLE `user` (
`user_id` int(11) NOT NULL auto_increment,
`username` varchar(30) NOT NULL default '',
`firstname` varchar(30) NOT NULL default '',
`lastname` varchar(30) NOT NULL default '',
`email` varchar(100) NOT NULL default '',
`password` varchar(8) NOT NULL default '',
`admin` char(1) NOT NULL default 'N',
PRIMARY KEY (`user_id`),
UNIQUE KEY `username` (`username`)
) TYPE=innodb
CREATE TABLE `wishlist` (
`wishlist_id` int(11) NOT NULL auto_increment,
`user_id` int(11) NOT NULL,
PRIMARY KEY (`wishlist_id`),
FOREIGN KEY (`user_id`) REFERENCES `user` (`user_id`)
) TYPE = innodb
I am hoping I am just making some strange mistake. Also of note, I created
the wishlist table once before without the foreign key constraint and dropped
it. I have read that there might be some problems there too, but if I take
out the Foreign Key constraint it creates the wishlish table which leads me
to believe this isn't that problem.
Thanks,
Patrick Burleson
Hi!!
I am trying create the following tables:-
CREATE TABLE Scenario (
Scenario CHAR(10) NOT NULL PRIMARY KEY,
CopyFromScenario CHAR(10)) TYPE = InnoDB;
CREATE TABLE Attribute(
Attribute CHAR(25) NOT NULL PRIMARY KEY,
Type CHAR(25)) TYPE = InnoDB;
CREATE TABLE AttributeValue(
Attribute CHAR(25) NOT NULL,
INDEX par_ind(Attribute),
FOREIGN KEY (Attribute) REFERENCES
Attribute(Attribute) ,
Value VARCHAR(150) NOT NULL,
Scenario CHAR(10) NOT NULL,
INDEX sce_ind(Scenario),
FOREIGN KEY (Scenario) REFERENCES Scenario(Scenario)
) TYPE = INNODB;
But for the third table AttributeValue it is giving
the error as:-
ERROR 1005: Can't create table
'.\netaps\AttributeValue.frm' (errno: 150)
Please help
Urgent
Thanks
Amit Lonkar.
Amit
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php