m i l e s wrote:
Hi,

Can anyone tell me if this is the correct syntax for a self reference & Index ?

--> ALTER TABLE `RPI_CTYPE` ADD FOREIGN KEY (`RPI_CT_REPLCID`) REFERENCES `RPI_CTYPE`(`RPI_CT_ID`);
-->  CREATE INDEX RPI_H_REPLCID_idxfk ON RPI_HOW (RPI_H_REPLCID);

If you try it what happens? I don't know if foreign keys can reference itself like that, the best way to find out is to try it.

The create index statement will work but it's not going to be on the same table.. don't know if that's a typo or what.

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

Reply via email to