cancel
Showing results for 
Search instead for 
Did you mean: 

How do we add Foreign key to a HDBTABLE

Former Member
0 Kudos

Hi,

We are using SP8 hdbtable concept and created tables in HANA. Now we want enforce referential integrity on few tables and hence looking for syntaxc on how we apply foreign key constraints on the table definition on Development perspective.

I creating a run time object, stored procedure, But I am getting an error ALTER syntax is not supported as SQL Script.

Please let me know the possible approaches. We also need to transport the piece of the code to Q and P systems.

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Vishwatej,

Check  CDS hdbdd concept . This is really cool!

NAMESPACE SAMPLE ;

@SCHEMA: 'MYSCHEMA'

Entity TABLE_PERSON {

              

               key NAME : String(3);

               key COUNTRY_OF_BIRTH : Association [1] to TABLE_COUTNRY { C_ID};

      

                                      };

Please refer SAP documentation, there is latest documentation SPS9 about CDS.

Thanks

Siva