Syntax on Create Table...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Where can find the syntax on Create Table...?

I need to use Create Table... statement to create a access table with an
Autonumber column as PK.

Thanks!
 
John said:
Where can find the syntax on Create Table...?

I need to use Create Table... statement to create a access table with an
Autonumber column as PK.

Thanks!

Do a search on your c: drive for JETSQL40.chm.

Open the file, click on the index tab, and
type in CREATE TABLE, and then hit enter, and
then select "CREATE TABLE Statement
(Microsoft Jet SQL)"

This will show the syntax of CREATE TABLE


Sincerely,

Chris O.
 
I can not find any info on how to add a field which has a type of autotype ....

my query so far is:

CREATE TABLE tblAccTransLog (
AccTransLogID INTEGER PRIMARY KEY,
TransType INTEGER,
TransNo TEXT(50),
DateCreated DATETIME,
AccRef TEXT(50),
B2BComplete BIT);

I want AccTransLogID to be an autonumber field what do I need to add to the
above statement?
 
Hi,


use COUNTER or AUTOINCREMENT instead of INTEGER


With Jet 4.0 and ADO, you can also use IDENTITY and an optional seed and
increment too, as in

columnName AUTOINCREMENT( 1, 1 )


Hoping it may help,
Vanderghast, Access MVP
 
use COUNTER or AUTOINCREMENT instead of INTEGER

Thanks that did it :)

Just for completion sake the code is:

CREATE TABLE tblAccTransLog2 (
AccTransLogID AUTOINCREMENT( 1, 1) PRIMARY KEY,
TransType INTEGER,
TransNo TEXT(50),
DateCreated DATETIME,
AccRef TEXT(50),
B2BComplete BIT);
 
Back
Top