little syntax question 
Author Message
 little syntax question

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.



Wed, 18 Jun 1902 08:00:00 GMT
 little syntax question

create table A(a number)
  constraint xyz primary key(a);

Regards.
Michael.


Quote:
> 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.



Wed, 18 Jun 1902 08:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. little sql syntax question

2. A little SQL syntax help please

3. Need a little syntax help

4. DSN less connection to server error IM012 Driver keyword syntax error

5. ? syntax for DAO dsn-less connection to SQL server

6. DSN less connection to server error IM012 Driver keyword syntax error

7. Little help with SQL syntax

8. I have some little questions

9. A little question

10. Little question

11. Silly little date question

12. Tough View Question (at least for me)


 
Powered by phpBB® Forum Software