Solved

Can't create table

Posted on 2006-10-21
3
455 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

726 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