db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-382) Doc Review: Derby Reference Manual
Date Fri, 24 Jun 2005 22:17:58 GMT
    [ http://issues.apache.org/jira/browse/DERBY-382?page=comments#action_12314432 ] 

Kathey Marsden commented on DERBY-382:

Transfering this comment from DERBY-275 cause I was a day late and a dollar short with that
one.  In the reverence manual in CREATE TABLE


Note that unlike a GENERATED ALWAYS column, a GENERATED BY DEFAULT column does not guarantee
uniqueness. Thus, in the above example, the hi and salut rows will both have an identity value
of "1", because the generated column starts at "1" and the user-specified value was also "1".
To prevent this, you can use the "STARTS WITH" keyword described below. To check for this
condition and disallow it, you can use a primary key or unique constraint on the GENERATED
BY DEFAULT identity column. 

In the paragraph STARTS WITH should be START WITH and loading or importing data should be

To prevent this, you can use the "STARTS WITH" keyword described below. 


To prevent duplication especially when loading or importing data, create the table using a
"START WITH" value which corresponds to the first 
identity value that the system should assign. 


create table greetings 
        (i int generated by default as identity (START WITH 2, INCREMENT BY 1), 
 ch char(50)); 
-- specify value "1": 
insert into greetings values (1, 'hi'); 
-- use generated default 
insert into greetings values (DEFAULT, 'salut'); 
-- use generated default 
insert into greetings(ch) values ('bonjour'); 

> Doc Review: Derby Reference Manual
> ----------------------------------
>          Key: DERBY-382
>          URL: http://issues.apache.org/jira/browse/DERBY-382
>      Project: Derby
>         Type: Improvement
>   Components: Documentation
>  Environment: all
>     Reporter: Jeff Levitt
>     Priority: Minor
>      Fix For:

> This issue tracks comments for the Derby Reference Manual. The deadline for posting comments
is Tuesday, June 28, noon Pacific time.
> Some guidelines to follow when posting comments to this issue are:
> - Try to make clear and concise comments about what you want changed whenever possible.
 Provide concrete comments that say "Please change <original> to <modified>" instead
of generic comments like "This section needs to be rewritten."
> - If you're reviewing the HTML Files copy, include the URL for the page in the review
comment. Obtain the URL like this:
>     * highlight the topic in the left frame
>     * right click
>     * choose "Properties"
>     * copy and paste the address in the pop up box.
> - If you're reviewing the PDF copy, in the review comment:
>     * Include the page number for the PDF, and indicate whether the number is the PDF
sheet number or the printed page number.
>     * Include the title of the section that the problem occurs in. If it's in a subsection,
try to include the hierarchy of titles.
> - Please don't review the HTML Book copy -- it'll be time consuming to match up that
copy with the underlying DITA source.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message