Cascade update / delete in Microsoft access sql editor

Joined
Jan 14, 2017
Messages
2
Reaction score
0
I want to enforce referential integrity between two related tables using the sql editor. There is very little help available so any help will be gratefully received.
:)
 
Joined
Jan 14, 2017
Messages
2
Reaction score
0
These are the two tables I want to link on CustomerID caascading delete and update.

CREATE TABLE tblCutsomer
(
CustomerID INTEGER CONSTRAINT PK_CustomerID PRIMARY KEY
);

CREATE TABLE tblInvoices
(InvoiceID INTEGER CONSTRAINT PK_InvoiceID PRIMARY KEY,
CustomerID INTEGER NOT NULL CONSTRAINT FK_CustomerID
REFERENCES tblCustomers (CustomerID),
InvoiceDate DATETIME,
Amount CURRENCY)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top