-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 21 July 2003 04:14, Egor Egorov wrote:
> Michael Satterwhite <[EMAIL PROTECTED]> wrote:
> > I'm trying to add a foreign key to a table. All tables are INNODB. Table
> > a has following partial Definition:
> >
> > TableA
> > ( Fld1 int Primary Key,...
> > )
> >
> > TableB
> > (Fld2 int Primary Key,
> > Fld1 int not null, ...
> > )
> >
> > I use the following Statement:
> >
> >        Alter Table TableB Add Constraint FK1 (Fld1) References TableA
> > (Fld1) on delete cascade;
> >
<SNIP>

Sorry, I tried to generalize the tables, then put the error verbatim - my 
fault. With the table definitions as above, and the ALTER TABLE statement 
exactly as above, I get the following error:

ERROR 1064: You have an error in your SQL syntax.  Check the manual that 
corresponds to your MySQL server version for the right syntax to use near 
'(Fld1) References TableA (Fld1) on Delete Cascade' at line 1


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQE/HHOFjeziQOokQnARAvqvAKCEtIATxn0xCfmR+NMfisxQijSs9ACeK0xZ
URj0lFcQZdzgXirWciA8JJE=
=89ad
-----END PGP SIGNATURE-----


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to