SAPUI5: How to create a Foreign Key link between two Tables in HANA

as the following titles states,

I do have Two Tables first one looks as the following:

COLUMN TABLE "FirstTable"(
    "exampleId" INTEGER CS_INT NOT NULL,
    "Name" VARCHAR(50) NOT NULL,
    PRIMARY KEY ("exampleId")

) UNLOAD PRIORITY 5 AUTO MERGE;

and Second Table, which should have the Primary Key of FirstTable as a Foreign Key, so that a link between those two tables is established.

SecondTable:

COLUMN TABLE "SecondTable"(
    "scndID" INTEGER CS_INT NOT NULL,
    "exampleId" INTEGER CS_INT NOT NULL,
    PRIMARY KEY ("scndID"),
    FOREIGN KEY("exampleId")

) UNLOAD PRIORITY 5 AUTO MERGE;

Issue: FOREIGN KEY doesn’t work / isn’t recognized.

Question: How to create a link between two tables with Foreign Keys ?

29 thoughts on “SAPUI5: How to create a Foreign Key link between two Tables in HANA”

Leave a Comment