Jeff,

MySQL does not have system tables from where you could query metadata with
ordinary SELECT queries. You have to use

SHOW CREATE TABLE tablename.

If you do not see your foreign key definitions in SHOW CREATE TABLE, then
you probably are using MyISAM tables, which do not support foreign keys.

InnoDB type tables support foreign keys and print them in SHOW CREATE TABLE,
if you have a fairly recent MySQL version.

Regards,

Heikki
Innobase Oy
sql query


............
Subject: Re: How to determine foreign keys? Meta data?
From: Jeff Epstein
Date: Thu, 20 Feb 2003 05:48:25 -0800 (PST)



Thanks to you both, Karam and KH.  These suggestions are most helpful.

However, my ultimate goal is to find some sort of "query", via a catalog
table, that can get arbitrary meta data from within the database.  This
information will be used in subsequent queries.

Thanks, to you or anyone in the mysql mailing list, for further
suggestions (original letter below).


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to