|Subject||Re: [firebird-support] Re: Differences when adding a Primary Key|
hi. Maybe you post an ilegal name or this name are not unique for entery database objects name's. every object in firebird database must be unique. no matters if the same name is used on diferent tables.
On Fri, Aug 21, 2015 at 12:24 PM, 'Walter R. Ojeda Valiente' sistemas2000profesional@... [firebird-support] <firstname.lastname@example.org> wrote:Nobody knows?Nobody has any idea?Greetings.Walter.On Thu, Aug 20, 2015 at 10:45 AM, Walter R. Ojeda Valiente <sistemas2000profesional@...> wrote:Hello everybodyFor add a Primary Key to a table we can write:ALTER TABLE MyTable ADD PRIMARY KEY (ID);or we can write:ALTER TABLE MyTable ADD CONSTRAINT MyPK PRIMARY KEY (ID);In the first case, the Firebird puts the name of the Primary Key, in the second case we choose that name, but...Why sometimes the first case fails and the second case always work?Of course that the table has not a Primary Key yet and the ID column has not nulls neither duplicated values.But (just sometimes) the first case fails.Greetings.Walter.