1

I am trying to get the key constraints on the table name 'meta'. But the information schema doesn't work and I am new to MonetDB. Is there any way I can find the primary key and foreign key in my table?

The Query I tried:

SELECT *
FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE
WHERE OBJECTPROPERTY(OBJECT_ID(constraint_name), 'IsPrimaryKey') = 1
AND TABLE_NAME = 'meta'

But this query didn't work, Since MonetDB query is different and I used /w-1 to get the table content and its data types but don't know about how to get key details.

Thanks for the help.

KSp
  • 1,199
  • 1
  • 11
  • 29

1 Answers1

1

You can use the \d <table name> meta command in mclient. See this answer for more details.