Try this
CREATE TABLE FAQ(
id int NOT NULL IDENTITY,
Question char(200),
Answer char(300),
PRIMARY KEY (id));
I'm assuming we're talking about SQL? THat's what I'm referencing. IDENTITY
will make the ID field the primary Key and make it increment.
J.
John Wilker
Web Applications Consultant
Macromedia Certified ColdFusion Developer
www.red-omega.com <http://www.red-omega.com>
What does Snoop Dogg use to do his laundry? Blee-otch!
-----Original Message-----
From: Heidi Belal [mailto:[EMAIL PROTECTED]]
Sent: Sunday, June 24, 2001 2:52 AM
To: CF-Talk
Subject: SQL question
Hi,
I'm trying to create a database remotely. This is the
code i'm using, but i want to add that the id is auto
incremented. Whenever i try specifying that in
various different ways, it gives me an error! Can
anyone tell me the right syntax to specify that i want
the id to auto increment?
the code:
CREATE TABLE FAQ(
id int NOT NULL,
Question char(200),
Answer char(300),
PRIMARY KEY (id));
i tried:
CREATE TABLE FAQ(
id int NOT NULL AUTO_INCREMENT,
Question char(200),
Answer char(300),
PRIMARY KEY (id));
and:
CREATE TABLE FAQ(
id int NOT NULL,
Question char(200),
Answer char(300),
PRIMARY KEY (id)
AUTO_INCREMENT (id));
none of those worked!
Heidi
=====
Heidi Belal
ICQ# 32127109
A bus stops at a bus station.
A train stops at a train station. On my desk
I have a work station...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists