cancel
Showing results for 
Search instead for 
Did you mean: 

Get Foreign & Primary Key full details in Hana SPS 08 Database

Former Member
0 Kudos

Hi Friends,

I have a requirement to find out the SYSTEM KEY CONSTRAINTS(Primary & Foreign) in SAP HANA SPS 08 Version.

1.Earlier i used to follow the following syntax when I was using SPS 06 Version.

---for Primary key

SELECT * FROM "_SYS_STATISTICS"."CONSTRAINTS" WHERE SCHEMA_NAME = 'TEST';

---for foreign key

SELECT * FROM "_SYS_STATISTICS"."REFERENTIAL_CONSTRAINTS" WHERE SCHEMA_NAME = 'TEST';

Now i am not able to find CONSTRAINTS AND REFERENTIAL CONSTRAINTS  Tables in the same _SYS_STATISTICS Schema.

Can anyone help me how do i get it.

Regards

Nagarjuna

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

These tables belong to SYS and not to _SYS_STATISTICS. So just omit '"_SYS_STATISTICS".' and it should work fine.

Answers (0)