Solved

Can't create table

Posted on 2006-10-21
3
451 Views
Last Modified: 2012-06-22
I have to tables
Employee(id,firstname,middlename,lastname,function)
Function(id,description)


Im trying to create foreign key on Employye in field function but i get the following error:

Can't create table '.\mydb\#sql-e28_8.frm' (Error: 150)

Employee.function has same data type with Function.ID.
Table types are InnoDB.
0
Comment
Question by:Albvision
3 Comments
 
LVL 9

Expert Comment

by:riaancornelius
ID: 17780500
0
 
LVL 14

Expert Comment

by:racek
ID: 17780691
first - create index on Employe(fuunction) and then can you continue with FK creation...
0
 
LVL 8

Accepted Solution

by:
lokus earned 250 total points
ID: 17785921
Error 150 is foreign key error.
Do a SHOW INNODB STATUS and you can search for the foreign key error, you will get a better details of the error.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MySQL - Limit or Top Records 15 43
mysql Encryption with PHP 8 95
How to loop bootstrap columns which contain database records 9 23
ebay table structure 2 0
Introduction In this article, I will by showing a nice little trick for MySQL similar to that of my previous EE Article for SQLite (http://www.sqlite.org/), A SQLite Tidbit: Quick Numbers Table Generation (http://www.experts-exchange.com/A_3570.htm…
I use MySQL for many of my development projects in a Windows environment. To manage my databases (and perform queries) for years I used a tool called MySQL administrator.  This tool has since been replaced by MySQL Workbench. So I decided to m…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now