Solved

Can't create table

Posted on 2006-10-21
3
450 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

More Fun with XML and MySQL – Parsing Delimited String with a Single SQL Statement Are you ready for another of my SQL tidbits?  Hopefully so, as in this adventure, I will be covering a topic that comes up a lot which is parsing a comma (or other…
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

708 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

20 Experts available now in Live!

Get 1:1 Help Now