473,651 Members | 2,790 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ERROR 1005 at line 3: Can't create table '.\company\empl oyee.frm' (errno: 150)

USE company;
DROP TABLE IF EXISTS EMPLOYEE;
CREATE TABLE EMPLOYEE
(
# PK
SSN CHAR(9) NOT NULL,
# FK
SUPERSSN CHAR(9),
DNO INT NOT NULL DEFAULT 1,
CONSTRAINT EMPPK
PRIMARY KEY (SSN),
FOREIGN KEY (SUPERSSN) REFERENCES EMPLOYEE(SSN), # THIS runs
FOREIGN KEY (DNO) REFERENCES DEPARTMENT(DNUM BER)); # TYPE=InnoDB
SHOW CREATE TABLE EMPLOYEE;
SHOW TABLE STATUS FROM COMPANY LIKE "EMPLOYEE";

=============== =============== =============== =============== ============
USE company;
DROP TABLE IF EXISTS EMPLOYEE;
CREATE TABLE EMPLOYEE
(
# PK
SSN CHAR(9) NOT NULL,
# FK
SUPERSSN CHAR(9),
DNO INT NOT NULL DEFAULT 1,
CONSTRAINT EMPPK
PRIMARY KEY (SSN),
FOREIGN KEY (SUPERSSN) REFERENCES EMPLOYEE(SSN), # THIS woun't DO !!!
FOREIGN KEY (DNO) REFERENCES DEPARTMENT(DNUM BER))TYPE=InnoD B; #
SHOW CREATE TABLE EMPLOYEE;
SHOW TABLE STATUS FROM COMPANY LIKE "EMPLOYEE";

C:\mysql\bin>my sql < Company_00.sql > out.txt
ERROR 1005 at line 3: Can't create table '.\company\empl oyee.frm'
(errno: 150)
What can I DO ?

mysql> SHOW VARIABLES LIKE "have_innod b";
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| have_innodb | YES |
+---------------+-------+
1 row in set (0.00 sec)

mysql>

Yours Sincerely

Morten Gulbrandsen

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/my***********...ie.nctu.edu.tw

Jul 19 '05 #1
0 3521

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1162
by: Morten Gulbrandsen | last post by:
USE company; DROP TABLE IF EXISTS EMPLOYEE; CREATE TABLE EMPLOYEE ( # PK SSN CHAR(9) NOT NULL, # FK SUPERSSN CHAR(9), DNO INT NOT NULL DEFAULT 1, CONSTRAINT EMPPK
0
24358
by: CoOL! . | last post by:
Hello, I found the key to solve this problem in: http://darkstar.ist.utl.pt/mysql/doc/en/InnoDB_foreign_key_constraints.html You'll probably need an INDEX for that new foreign key you are declaring in older versions this isn't neccesary but in latest ones it is a restriction. You can have more info about the error description if you have root access by typing
0
5078
by: Morten Gulbrandsen | last post by:
Hello programmers, I think something is wrong with my administration, Basically I get these messages, ERROR 1005 at line 9: Can't create table '.\company\department.frm' (errno: 150) ERROR 1045: Access denied for user: 'elmasri@127.0.0.1' (Using password: YES)
0
3034
by: Morten Gulbrandsen | last post by:
mysql> USE company; Database changed mysql> mysql> DROP TABLE IF EXISTS EMPLOYEE; -------------- DROP TABLE IF EXISTS EMPLOYEE -------------- Query OK, 0 rows affected (0.00 sec)
2
3329
by: jith87 | last post by:
This is MySql lang...Link nt able to poen so i ve posted here.. What is error 1005 Can't create table (errno:150)....... There is a field X in a table Y. This X field has to be accessed by another table Z.... How to alter table add constraint for the field X in table Z.....
3
1818
by: haries | last post by:
Can anyone diagnose what the problem is in my design , I have a User table and an Entries table with a has_many relation and a FK user_id in Entries. I have now added a new table called EntryStatuses Entry has a has_one EntryStatus relationship. As I try to add the FK entry_id in EntryStatuses, I get an error -- create_table(:entry_statuses, {:force=>true})
6
9060
by: daveftl | last post by:
Good day to all...i always have this error after making an ALTER command ... #1005 - Can't create table '.\_ftl\#sql-918_f.frm' (errno: 150) whats the cause of this error...thanks in advance..
1
5160
by: Fischi | last post by:
Hi, I am getting the error message Script line: 84 Can't create table '.\dwh\f_umsatz.frm' (errno: 150) during execution of the following script on a windows system and mysql 5.0: CREATE TABLE d_kunden(id INT NOT NULL AUTO_INCREMENT,
1
1790
by: sprooj | last post by:
hi,I'm trying to add a foreign key constraint to an attribute using MySQL , but an error keeps on appearing : ERROR 1005 (HY000): Can't create table '.\is224\#sql- 110c_1.frm' (errno:150) Can anyone help me with this one.
9
2942
by: AmiMitra | last post by:
i am using mysql 5.1. i have one table named as resv_record. the format is create table resv_record ( book enum('h','c','r','f','t') , resv_id int(8) auto_increment not null , user_id varchar(12) not null , primary key( book , resv_id))engine=myisam; i am creating a new table named flight_book as create table flight_booking ( resv_id int(8) not null , jrny_dt date not null , from_place varchar(20) not null, destination varchar(20) not null...
0
8357
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8277
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8803
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8700
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8465
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7298
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6158
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5612
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
1910
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.