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; > > When I run that statement, I get the following error: > > 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 '(SetNo) > References BackupSets (SetNo) ON DELETE CASCADE' at lin >
Alter table doesn't contain SetNo column, BackupSets table .. So, provide your ALTER TABLE statement. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]