Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / January 2006

Tip: Looking for answers? Try searching our database.

Syntax on Create Table...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John - 10 Nov 2005 23:07 GMT
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!
Chris2 - 10 Nov 2005 23:18 GMT
> 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.
chilling - 11 Jan 2006 19:49 GMT
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?
Michel Walsh - 11 Jan 2006 20:21 GMT
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

>I can not find any info on how to add a field which has a type of autotype
>....
[quoted text clipped - 12 lines]
> the
> above statement?
chilling - 12 Jan 2006 15:23 GMT
> 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);
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.