k (parent_id) REFERENCES parent(id) ON DELETE NO ACTION ON UPDATE
NO ACTION;
Query OK, 0 rows affected (0.24 sec)
Records: 0 Duplicates: 0 Warnings: 0
Thanks for your prompt help.
Hari
On Tue, Feb 22, 2011 at 2:13 PM, hari jayaram wrote:
> Thanks shawn for your reply. Your simplification of th
i,
>
> You already posted the best answer we could provide :)
>
>
> On 2/22/2011 13:00, hari jayaram wrote:
>
>> Hi I am getting a Foreign key error .
>> ...
>>
>> I have attached the create table syntax for both the parent and child
>> tables
Hi I am getting a Foreign key error .
The command that gives the error is
ALTER TABLE child ADD CONSTRAINT child_parent_fk FOREIGN KEY (id) REFERENCES
parent(id) ON DELETE NO ACTION ON UPDATE NO ACTION;
And the error message is
ERROR 1005 (HY000): Can't create table
'./testforeignkeysyntax_lap/