Using SQL to build tables and set up constraints

Chunk

Registered User.
Local time
Today, 07:58
Joined
Oct 25, 2004
Messages
64
Is it possible to use SQL to code tables and set up constraints on your fields?

I know quite a lot of Oracle SQL, and im used to working within an SQL*Plus command line type environment.

I know the syntax is different, but if I can use access in this way it would really help. Can someone tell me if it possible to do this, and if so how.

Thanks.
 
Is it possible to use SQL to code tables and set up constraints on your fields?
Yes. Open the query builder in SQL view and type in the DDL. To get syntax for Jet DDL, open Help and select the Table of Contents. Drill down to Microsoft Jet SQL Reference and then to Data Definition Language.

but if I can use access in this way it would really help.
I can't believe you think it is easier to create tables this way than to use the GUI table designer and relationships window. But to each his own.
 
Pat Hartman said:
Yes. Open the query builder in SQL view and type in the DDL. To get syntax for Jet DDL, open Help and select the Table of Contents. Drill down to Microsoft Jet SQL Reference and then to Data Definition Language.

I can't believe you think it is easier to create tables this way than to use the GUI table designer and relationships window. But to each his own.

Ive been taught solely using oracle sql*plus, so it seems normal to me. Its more writting the check constraints etc that I find easier.

Thanks very much for the help.
 
When using the relationships window, it is simply a matter of drawing lines to connect the two tables, choosing the correct field names, and checking the appropriate checkboxes.

In the table design view, you highlight the field or fields you want to comprise the pk and click a button. Compound indexes need to be created via the indexes window. Single field indexes are a property of the field.

Try it, you'll like it:)
 

Users who are viewing this thread

Back
Top Bottom