Re: Mysql and FOREIGN KEY

2007-02-21 Thread Nils Meyer
Hi, Micol lupen wrote: FOREIGN KEY(of_idvillaggio),REFERENCES villaggio(idvillaggio) ^^^ check here! ON UPDATE CASCADE ON DELETE RESTRICT)ENGINE=INNODB; No comma before REFERENCES. REFERENCES is part of the foreign key definition. regards Nils -- MySQL General Mailing

Re: Mysql and FOREIGN KEY

2007-02-21 Thread Gerald L. Clark
Micol lupen wrote: Hi to all, I am a student, i am studing Mysql FOREIGN KEY for to do a little progect, but i have this problem: i create this table: CREATE TABLE Cliente( codcliente VARCHAR(6) NOT NULL, nome VARCHAR(10) NOT NULL,cognome VARCHAR(20) NOT NULL, citta VARCHAR(10), indirizzo VARCHAR

Mysql and FOREIGN KEY

2007-02-21 Thread Micol lupen
Hi to all, I am a student, i am studing Mysql FOREIGN KEY for to do a little progect, but i have this problem: i create this table: CREATE TABLE Cliente( codcliente VARCHAR(6) NOT NULL, nome VARCHAR(10) NOT NULL,cognome VARCHAR(20) NOT NULL, citta VARCHAR(10), indirizzo VARCHAR(20), tel VARCHAR(7)