SELECT
*
FROM
dbo.sysobjects
WHERE
id = object_id(N'[dbo].[TABLE_NAME]')
AND
OBJECTPROPERTY(id, N'IsUserTable') = 1
)
ALTER TABLE TABLE_NAME ADD
CONSTRAINT UNIQUELY_NAME_YOUR_PK PRIMARY KEY
(
TABLE_FIELD_NAME
)
Mike
-----Original Mes sage-----
From: Robert Orlini [mailto:[EMAIL PROTECTED]
Sent: Friday, January 02, 2004 10:53 AM
To: CF-Talk
Subject: Create table ID field
I have this code to create a table in a cfm file:
<CFQuery datasource="test" name="#trialname#">
Create table #trialname#
(Orderdate Char (50) not null,
Institution Char (50) not null,
Customer Char (50) not null,
address Char (50) not null,
city Char (10) not null,
state Char (10) not null,
zip Char (5) not null,
phone Char (8) not null,
login Char (10) not null,
email1 Char (50) not null)
</CFQUERY>
What is the code to add a primary key ID field?
Thx.
Robert O.
_____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

