?
Solved

Can't create table

Posted on 2006-10-21
3
Medium Priority
?
458 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 750 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
In this article, I’ll talk about multi-threaded slave statistics printed in MySQL error log file.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

764 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