473,385 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Foreign key Constraint Fails in MYSQL 5.0.18

Hi

I'm using MySQL 5.0.18 . Here i'm unable to assign foreign key. Though it is assigned , while adding a row to a child table , it violates the foreign key rule.
Database engine is MyISAM. It is mentioned in MySQL document , that MyISAM (default one) will not support foreign key constraints. Hence , while creating table i maually modified the syntax as ,

create table table1 (... ) engine = innodb

But still , i'm unable to assign and use foreign keys in MySQL Database.

Let me know the solution

Thanks in advance
somaskarthic
Dec 18 '06 #1
1 2085
ronverdonk
4,258 Expert 4TB
Our members could easier see your problem and be more inclined to help you out (or try to) if you showed us the SQL you are using or have used.

Ronald :cool:
Dec 18 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: dcp | last post by:
I just installed the 4.1.0-alpha-max-nt version of MySql and have just started playing around with it. My first test was to try to create a couple of tables, one with a foreign key constraint. ...
0
by: Jeremiah Jacks | last post by:
I just upgraded to MySQL 4.0.14-standard for RedHat Linux and am using = the pre-compiled binaries. I have a database with INNODB tables. When I insert a row into one of the child tables, I get...
0
by: John Towell | last post by:
------=_NextPart_000_0008_01C360DD.C2475700 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit We are trying to load a set of data using Hibernate (O/R mapping tool)....
0
by: Phil | last post by:
I am using MySQL 4.1.1-1. When I add a "named" foreign key constraint alter table sb_query_nm_sub_tp add constraint f1sbquerynmsubtp foreign key (query_nm) references sb_query_class...
2
by: Ralph Smith | last post by:
I'm having trouble copying a database to another machine. Here are the two table's in ths database and the sql commands: DROP TABLE IF EXISTS `clients`; CREATE TABLE `clients` ( `client_id`...
5
by: kutty | last post by:
Hi All, I am loading data to a child table from a text file. the text files also contains data not referenced by parent key. while loading the data if one row fails to satisfies the constraint...
5
by: coosa | last post by:
Dear all, I'm new under mysql and have installed mysql5.0.24a community edition for win32. I have tried to implement a foreign key for this following sample scenario: CREATE TABLE student (...
4
by: Harshpandya | last post by:
Hi I am new at ASP and MYSQL. I am Using Navicat to access MYSQL database. My Problem is when i create the foreign key in "Navicat" -it gives me this error. 1452-cannot add or update child...
2
by: jarea | last post by:
I have read quite a bit about this error but I have yet to find the solution to my problem. I am trying to execute the following mysql statement: alter table line_items add...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.