db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Legolas Woodland <legola...@gmail.com>
Subject Re: What is wrong with this sql script , im sure that it is ok , but derby return error.
Date Mon, 02 Jan 2006 21:51:29 GMT
Thomas Dudziak wrote:
> On 1/2/06, Legolas Woodland <legolas.w@gmail.com> 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
>
>   


Thank you very much.
It works

Mime
View raw message