I have the same problem for finding out which field is the primary key. I now have: select k.name as key, t.name as tablename from sys.keys as k, sys.tables as t where k.type=0 and k.table_id = t.id; Should I stringparse the key field for finding out the column name? -- Gijs Molenaar http://www.astro.uva.nl/people/gijs-molenaar/ On Jun 14, 2012, at 12:16 PM, Molenaar, Gijs wrote: And how should I interpret the rkey value? I can't find a matching column with that ID? Thanks, -- Gijs Molenaar http://www.astro.uva.nl/people/gijs-molenaar/ On Jun 14, 2012, at 12:04 PM, Stefan de Konink wrote: On Thu, 14 Jun 2012, Molenaar, Gijs wrote: Hi monetdb people, How do I find all foreign key relationships with MonetDB using SQL? If you look at; select * from _tables; You can also see a keys, does that help? Stefan------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ !DSPAM:1,4fd9b2f392541414512499! _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.netmailto:MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users !DSPAM:1,4fd9b2f392541414512499! ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___________________... MonetDB-users mailing list MonetDB-users@lists.sourceforge.netmailto:MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___________________... MonetDB-users mailing list MonetDB-users@lists.sourceforge.netmailto:MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users