Subject | Re: [firebird-support] Still not working REFLEXIVE FOREIGN KEY |
---|---|
Author | Carlos Andres Callo Lazo |
Post date | 2007-10-15T18:52:39Z |
> Having the following table :Ok You're right, the table name is Employees.
>
> ============ ===
> 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.
.....
>>Do you mean?Yes that's rigth. I wantto create a self referencing foreignkey.
>>Alter table Employees add Constraint "FK_Employees" foreign
>>key(idboss) references Employees(IdEmploye e)
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