U
user01
The MS ACCESS online guide states that ON UPDATE CASCADE or ON UPDATE SET
NULL (as well as ON DELETE CASCADE or ON DELETE SET NULL) options can be
used with Referential Integrity constraints in the CREATE TABLE command. But
every time I try to execute the CREATE TABLE command chown below, I get a
syntax error with the ON DELETE/ ON UPDATE optionS. Does ACCESS not support
the ON UPDATE/ON DELETE options at all?
CREATE TABLE OrderTbl
( OrdNo CHAR(8),
OrdDate DATE NOT NULL,
CustNo CHAR(8) NOT NULL,
EmpNo CHAR(8),
CONSTRAINT PKOrderTbl PRIMARY KEY (OrdNo) ,
CONSTRAINT FKCustNo FOREIGN KEY (CustNo) REFERENCES Customer
ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT FKEmpNo FOREIGN KEY (EmpNo) REFERENCES Employee
ON DELETE CASCADE ON UPDATE CASCADE )
The Customer and Employee Tables have already been created.
Thanks in advance for your responses
NULL (as well as ON DELETE CASCADE or ON DELETE SET NULL) options can be
used with Referential Integrity constraints in the CREATE TABLE command. But
every time I try to execute the CREATE TABLE command chown below, I get a
syntax error with the ON DELETE/ ON UPDATE optionS. Does ACCESS not support
the ON UPDATE/ON DELETE options at all?
CREATE TABLE OrderTbl
( OrdNo CHAR(8),
OrdDate DATE NOT NULL,
CustNo CHAR(8) NOT NULL,
EmpNo CHAR(8),
CONSTRAINT PKOrderTbl PRIMARY KEY (OrdNo) ,
CONSTRAINT FKCustNo FOREIGN KEY (CustNo) REFERENCES Customer
ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT FKEmpNo FOREIGN KEY (EmpNo) REFERENCES Employee
ON DELETE CASCADE ON UPDATE CASCADE )
The Customer and Employee Tables have already been created.
Thanks in advance for your responses