On 1/2/06, Legolas Woodland <[EMAIL PROTECTED]> wrote:

> Thank you for reading my post.
> can some one please check and see what is wrong with this scripts ?
> im sure that they should execute but derby return errors like :
> org.apache.derby.client.am.SqlException: Constraints
> 'SQL060103004635123' and 'SQL060103004635121' have the same set of
> columns, which is not allowed.
>
> create table WEBSITES (USERID integer not null unique, WEBSITEID bigint
> not null unique, DOMAINNAME varchar(255) not null unique, DESCRIPTION
> varchar(255), PPVIEW double, PPCLICK double, PPWEEK double, totalClick
> bigint, totalView bigint, active smallint, primary key (WEBSITEID));
> create table CATEGORIES (CATEGORYID integer not null unique,
> CATEGORYNAME varchar(255) not null unique, CATEGORYDESCRIPTION
> varchar(255), categorytotalClick bigint, categoryTotalView bigint,
> primary key (CATEGORYID));

Names like SQL060103004635123 are created by Derby for internal things
like in this case, unique indexes for primary keys. Your problem might
be because you specify "unique" for the columns that make up the
primary key, but this is automatically done by the "primary key"
constraint. Try to omit the "unique" specifier for the pk columns and
see whether that works.

Tom

Reply via email to