Matt,


This is the code I have:
<CFQuery datasource="test" name="#trialname#">
Create table #trialname#
(
id INTEGER,
CONSTRAINT #trialname#_pkey not null PRIMARY KEY (id),
Orderdate Char (50) not null,
Institution Char (50) not null...


Do I jhave to add all those fields you specified  just to make it autonumber?


Thx.


RO

-----Original Message-----
From: Matt Robertson [mailto:[EMAIL PROTECTED]
Sent: Friday, January 02, 2004 12:43 PM
To: CF-Talk
Subject: RE: Create table ID field

Here's an example for an Access table, where the primary key is an
autonumber field, and there's a separate index as well.

<cfquery
datasource="#request.blahblah#">
CREATE TABLE myfile (
  ID COUNTER not NULL PRIMARY KEY,
  ParentID number NULL,
  LinkID number NULL,
  Slot number NULL ,
  ItemType text(10) NULL
);
</cfquery>
<cfquery
datasource="#request.blahblah#">
CREATE INDEX ParentID on myfile(ParentID);
</cfquery>

--------------------------------------------
Matt Robertson       [EMAIL PROTECTED]
MSB Designs, Inc.   http://mysecretbase.com
--------------------------------------------
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to