Basic SQL DDL Statements

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.
 
A

aaron.kempf

I disagree.

it is not easier to learn SQL in jet.

JET is a piece of shit ass language and anyone that uses it is a
friggin leper and you should spit on them.

If you need newbie-design view-- use Access Data Projects.

long term-- everyone needs to run SQL. Access MDB just isn't reliable
enough for a single user and a single record.

I reccomend that you learn 1 dialect of SQL instead of 2 and you stay
focused.

additionally; the educational resources that are available for SQL
Sever vs the resources for Access?

everybody in the world knows that Access is for friggin babies; and
it's nearly impossible to find CHALLENGING mdb development classes for
example.

but SQL Server? I've seen SQL Server classes in a hundred different
places.

simplify. One Dialect of SQL.

Spit on anyone that tells you otherwise.

-Aaron
 

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