K
Kokujin
This is going to be a very simple question:
I use Access 2000 with Jet Engine version 4 I wrote the following SQL
statements based on my Text Book....However I could not run the Second
table...
(1st Table)
CREATE TABLE VENDOR
([V_CODE] INTEGER NOT NULL UNIQUE,
[V_NAME] VARCHAR(35) NOT NULL,
[V_CONTACT] VARCHAR(15) NOT NULL,
[V_AREACODE] FCHAR(13) NOT NULL,
[V_PHONE] FCHAR(8) NOT NULL,
[V_STATE] FCHAR(2) NOT NULL,
[V_ORDER] FCHAR(1) NOT NULL,
PRIMARY KEY( [V_CODE]) );
(2nd Table)
CREATE TABLE PRODUCT
(P_CODE CHAR(10) NOT NULL UNIQUE,
P_DESCRIPT CHAR(35) NOT NULL,
P_INDATE DATE NOT NULL,
P_ONHAND SMALLINT NOT NULL,
P_MIN SMALLINT NOT NULL,
P_PRICE DECIMAL(8,2) NOT NULL
P_DISCOUNT DECIMAL(5,2) NOT NULL,
V_CODE INTERGER,
PRIMARY KEY(P_CODE),
FOREIGN KEY(V_CODE) REFERENCES VENDOR
ON DELETE RESTRICT
ON UPDATE CASCADE);
It seems that the way SQL is implemented with Access 2000 4.0, There
are some Reserved words that are not understood by the "JET" engine.
Such as the "ON DELETE RESTRICT" clauses. Therefore the questions is
How do I using SQL as implemented with Access 2000 4.0 Enforce
Referential Intergrity ? Are there new Words and Syntax "these" days ?
Do I have to use the "Constraint" word to define PKeys and FKeys ?
What is the best SQL dialect to learn these days and should I just
convert to SQL Server ? Yeah I know that "DECIMAL" should be replaced
by "CURRENCY". Thanks for any Help.
I use Access 2000 with Jet Engine version 4 I wrote the following SQL
statements based on my Text Book....However I could not run the Second
table...
(1st Table)
CREATE TABLE VENDOR
([V_CODE] INTEGER NOT NULL UNIQUE,
[V_NAME] VARCHAR(35) NOT NULL,
[V_CONTACT] VARCHAR(15) NOT NULL,
[V_AREACODE] FCHAR(13) NOT NULL,
[V_PHONE] FCHAR(8) NOT NULL,
[V_STATE] FCHAR(2) NOT NULL,
[V_ORDER] FCHAR(1) NOT NULL,
PRIMARY KEY( [V_CODE]) );
(2nd Table)
CREATE TABLE PRODUCT
(P_CODE CHAR(10) NOT NULL UNIQUE,
P_DESCRIPT CHAR(35) NOT NULL,
P_INDATE DATE NOT NULL,
P_ONHAND SMALLINT NOT NULL,
P_MIN SMALLINT NOT NULL,
P_PRICE DECIMAL(8,2) NOT NULL
P_DISCOUNT DECIMAL(5,2) NOT NULL,
V_CODE INTERGER,
PRIMARY KEY(P_CODE),
FOREIGN KEY(V_CODE) REFERENCES VENDOR
ON DELETE RESTRICT
ON UPDATE CASCADE);
It seems that the way SQL is implemented with Access 2000 4.0, There
are some Reserved words that are not understood by the "JET" engine.
Such as the "ON DELETE RESTRICT" clauses. Therefore the questions is
How do I using SQL as implemented with Access 2000 4.0 Enforce
Referential Intergrity ? Are there new Words and Syntax "these" days ?
Do I have to use the "Constraint" word to define PKeys and FKeys ?
What is the best SQL dialect to learn these days and should I just
convert to SQL Server ? Yeah I know that "DECIMAL" should be replaced
by "CURRENCY". Thanks for any Help.