Subject Re: [firebird-support] Still not working REFLEXIVE FOREIGN KEY
Author Carlos Andres Callo Lazo
> Having the following table :
>
> ============ ===
> Employees
> ============ ===
> (PK) idEmployee
> idBoss
> ============ ===
>
> Is this possible to do ?
>
> Alter table Employees add Constraint "FK_Employees" foreign key(idboss)
> references Employees(IdEmployee)
>

>>Presuming your table is actually called Employees and 'Emplyees' is
>>just a typo.

Ok You're right, the table name is Employees.
.....

>>Do you mean?

>>Alter table Employees add Constraint "FK_Employees" foreign
>>key(idboss) references Employees(IdEmploye e)


Yes that's rigth. I wantto create a self referencing foreignkey.
I tried it working with FireBird 1.5 but the server responses that it must
exist an explicitly created unique index over field IdEmployees
But i have already a PK constraint declared for IdEmployees and
of course it is under a unique constraint.

What can I do ?


Thanks in advance.


____________________________________________________________________________________
Catch up on fall's hot new shows on Yahoo! TV. Watch previews, get listings, and more!
http://tv.yahoo.com/collections/3658