Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> little syntax question

little syntax question

From: Doug Cowles <dcowles_at_bigfoot.com>
Date: Sat, 17 Jul 1999 20:44:55 -0400
Message-ID: <37912387.2D1C1D13@bigfoot.com>


I would like to give a primary key constraint a name on table creation, so
the constraint and it's associated index have an intelligable name. I know how to do it with
alter table blahblah add constraint xyz primary key etc., or usually stumble across it quickly enough, but how to do in the table like:

create table A (a NUMBER, primary key (a));

but acutally name the constraint -
I tried

create table A( a NUMBER, thename primary key(a));
create table A(a NUMBER, primary key thename(a));
create table A(a NUMBER, pimary key (a) thename);

to no avail. (trying this on personal Oracle 7.2).

If someone has the answer, if you wouldn't mind chucking in a storage clause to stick the primary key index on a different tablespace than the table
that would be immensely helpful as well.

Thanks very much in advance,
- Dc. Received on Sat Jul 17 1999 - 19:44:55 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US