Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Adding a foreign key in an existing table

$
0
0
When adding a foreign key gets an error:
Error Code: 1005. Can't create table 'itest.#sql-784_18f' (errno: 150)
I use the syntax:
Code:

ALTER TABLE INTR ADD FOREIGN KEY (USER) REFERENCES USERS(ID)
There is no table itest as is the name of the database. I do not understand this error. What is it?

Viewing all articles
Browse latest Browse all 13329

Trending Articles