db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Lynch <peterly...@pub.missioncap.ca>
Subject Re: Naming primary keys?
Date Fri, 04 Nov 2005 08:18:59 GMT
Example Oracle statement:

ALTER TABLE SAMPLE_TABLE
     ADD CONSTRAINT SAMPLE_TABLE_PK
         PRIMARY KEY (SAMPLE_ID);

...so the name of the PK is SAMPLE_TABLE_PK

I wasn't aware that this was uncommon. Thanks for pointing it out.

-Peter

Thomas Dudziak wrote:
> On 11/4/05, Peter Lynch <peterlynch@pub.missioncap.ca> wrote:
> 
> 
>>I can find no way to name my primary keys in the ddl xml.
>>
>>It seems it would make sense to have a primary-key element similar to the
>>foreign-key element to allow this.
>>
>>Can one of the devs confirm that this might be a good approach? If so I will
>>open a Jira issue.
> 
> 
> Why would you want to name the primary key constraint ? I don't know
> of any database that supports this, and a table can only have one
> primary key constraint (possibly spanning multiple columns) anyway ?
> 
> Tom
> 
> 
> 

Mime
View raw message