on 07-14-2015 1:24 PM
Hi Experts,
I am executing below commands for creating self referencing foreign key in SAP HANA.
I got the below two commands from SAP Help Portal.
CREATE TABLE SELF(A INTEGER PRIMARY KEY, B INTEGER);
ALTER TABLE SELF ADD CONSTRAINT FK_T1 FOREIGN KEY(B) REFERENCES SELF(A);
While executing above commands, the first command(i.e Create command) is working properly.
But Alter command is giving below error:
Could not execute 'ALTER TABLE SELF ADD CONSTRAINT FK_T1 FOREIGN KEY(B) REFERENCES SELF(A)' in 3 ms 76 µs .
SAP DBTech JDBC: [7]: feature not supported: cannot create foreign key constraint referencing the same table
Can anyone help me out with the above error.
I tried executing the above commands in both SAP HANA SPS 8 as well as SPS 9 but then also I am getting the above error.
Regards,
Jimit Doshi
Hi Doshi,
Did you work out the problem?
I encountered the same problem...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.