List:General Discussion« Previous MessageNext Message »
From:Varakorn Ungvichian Date:November 28 2004 7:56am
Subject:Re: How to retrieve constraints and links from MySQL tables?
View as plain text  
--- Martijn Tonies <m.tonies@stripped> wrote:
> The only way to do this is via
> SHOW CREATE TABLE <name>

I've just tried the command in question, but here's
the result:

CREATE TABLE `employees` (
  `employee_id` tinyint(4) NOT NULL auto_increment,
  `employee_first` varchar(20) NOT NULL default '',
  `employee_last` varchar(20) NOT NULL default '',
  `employee_address` varchar(255) NOT NULL default '',
  `position_id` tinyint(4) NOT NULL default '1',
  `employee_start` date default NULL,
  `employee_temp` tinyint(1) default '0',
  PRIMARY KEY  (`employee_id`),
  UNIQUE KEY `employee_id` (`employee_id`)
) TYPE=MyISAM 

No mention of foreign keys (or even any reference
links) at all. What I'd like is a command that returns
what foreign keys (or reference links) exist in a
given table (or database even). In my example, I would
like a command that will return a result that
indicates that the "position_id" column in the
"employees" table references the "position_id" column
in the "positions" table. Hope you understand what I'm
saying...

Varakorn Ungvichian


	
		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail
Thread
How to retrieve constraints and links from MySQL tables?Varakorn Ungvichian26 Nov
  • Re: How to retrieve constraints and links from MySQL tables?Martijn Tonies26 Nov
    • Re: How to retrieve constraints and links from MySQL tables?Varakorn Ungvichian28 Nov
    • Re: How to retrieve constraints and links from MySQL tables?Varakorn Ungvichian28 Nov
      • Re: How to retrieve constraints and links from MySQL tables?Martijn Tonies28 Nov
      • Re: How to retrieve constraints and links from MySQL tables?Michael Stassen28 Nov
        • Re: How to retrieve constraints and links from MySQL tables?Varakorn Ungvichian29 Nov
          • Re: How to retrieve constraints and links from MySQL tables?Michael Stassen29 Nov
RE: How to retrieve constraints and links from MySQL tables?Mechain Marc26 Nov
  • Re: How to retrieve constraints and links from MySQL tables?Martijn Tonies26 Nov