Re: Foreign Keys usage???
Posted by:
it99ama
Date: August 18, 2004 08:28AM
This worked:
CREATE TABLE operation (
operationID int NOT NULL AUTO_INCREMENT,
name varchar(50) default NULL,
PRIMARY KEY (OperationID)
)TYPE=InnoDB;
CREATE TABLE agent (
agentID int NOT NULL AUTO_INCREMENT,
name varchar(50) default NULL,
operationID int NOT NULL,
PRIMARY KEY(agentID),
#changed--->INDEX (operationID),
FOREIGN KEY(operationID) REFERENCES operation(operationID)
)TYPE=InnoDB;
:-)
/Anders
Subject
Written By
Posted
Re: Foreign Keys usage???
August 18, 2004 08:28AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.