|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
New to creating Access Queries in SQL
I'd like to write one script for a Query in Microsoft Access but it won't allow me to use multiple CREATE TABLE commands. It would be great if someone new a good site for beginners using SQL with Microsoft Access. Below is my code.
It rejects the code that is in red because the syntax is incorrect. CREATE TABLE PROJECT ( ProjectID Integer Primary Key, Name Char(25) Not Null, Department VarChar(100) Null, MaxHours Numeric(5,2)); CREATE TABLE EMPLOYEE( EmployeeNumber Integer NotNull, Name Char(25) Not Null, Phone Char(8) Department VarChar(100)); ALTER TABLE EMPLOYEE ADD CONTRAINT EmployeePK PRIMARY KEY (EmployeeNumber); I believe that this may work for Oracle but I need to know how to modify it so it works in access. |
|
#2
|
|||
|
|||
|
It is for Access XP
|
|
#3
|
|||
|
|||
|
Access data types are also different
use number for integer use text for varchar/char use memo for text use autonumber for identity See: http://www.aspfaq.com/show.asp?id=2214 |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft Access Development > New to creating Access Queries in SQL |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|