on 10-01-2015 3:40 AM
Hi Everyone,
Trying to create a foreign key referring to the primary key of same table. But prompted with, feature not supported: cannot create foreign key constraint referring to the same table.
Is it possible to create this link by any other means...
Please go through below syntax:
CREATE COLUMN TABLE "NEO_xxxxx"."C_EMPLOYEES" ("EMPLOYEENUMBER" INTEGER CS_INT NOT NULL ,
"LASTNAME" NVARCHAR(50) NOT NULL ,
"REPORTSTO" NVARCHAR(50) NULL ,
PRIMARY KEY ("EMPLOYEENUMBER"));
ALTER TABLE "NEO_xxxx"."C_EMPLOYEES" ADD CONSTRAINT "EMPLOYEES_FK2" FOREIGN KEY (REPORTSTO) REFERENCES "NEO_xxxx"."C_EMPLOYEES" (EMPLOYEENUMBER) ON UPDATE RESTRICT ON DELETE CASCADE |
That's supported as of SPS 10 but not on earlier SPs.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.