Re: How to retrieve constraints and links from MySQL tables?

2004-11-28 Thread Michael Stassen
Varakorn Ungvichian wrote: --- Michael Stassen <[EMAIL PROTECTED]> wrote: Varakorn Ungvichian wrote: Just realised something: my table was MyIsam. I switched it to InnoDB (which support FKs), but now: 1. "Show Create Table" still doesn't show reference links, and Well, of course not. It won't sh

Re: How to retrieve constraints and links from MySQL tables?

2004-11-28 Thread Varakorn Ungvichian
--- Michael Stassen <[EMAIL PROTECTED]> wrote: > > Varakorn Ungvichian wrote: > > Just realised something: my table was MyIsam. I > > switched it to InnoDB (which support FKs), but > now: > > 1. "Show Create Table" still doesn't show > reference > > links, and > > Well, of course not. It won't

Re: How to retrieve constraints and links from MySQL tables?

2004-11-28 Thread Michael Stassen
Varakorn Ungvichian wrote: Just realised something: my table was MyIsam. I switched it to InnoDB (which support FKs), but now: 1. "Show Create Table" still doesn't show reference links, and Well, of course not. It won't show them until you create them, which you haven't done according to #2. 2.

Re: How to retrieve constraints and links from MySQL tables?

2004-11-28 Thread Martijn Tonies
> Just realised something: my table was MyIsam. I > switched it to InnoDB (which support FKs), but now: > 1. "Show Create Table" still doesn't show reference > links, and > 2. I can't seem to make foreign keys, because it > generates the error: "ERROR 1005: Can't create table > '.\ltab\#sql-60c_1

Re: How to retrieve constraints and links from MySQL tables?

2004-11-28 Thread Varakorn Ungvichian
Just realised something: my table was MyIsam. I switched it to InnoDB (which support FKs), but now: 1. "Show Create Table" still doesn't show reference links, and 2. I can't seem to make foreign keys, because it generates the error: "ERROR 1005: Can't create table '.\ltab\#sql-60c_11.frm' (errno: 1

Re: How to retrieve constraints and links from MySQL tables?

2004-11-27 Thread Varakorn Ungvichian
--- Martijn Tonies <[EMAIL PROTECTED]> wrote: > The only way to do this is via > SHOW CREATE TABLE 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 '',

Re: How to retrieve constraints and links from MySQL tables?

2004-11-26 Thread Martijn Tonies
Hello, > You can use: > > show create table employee; > > or > > show table status like 'employee'; > in the column "comment" you have the information you are looking for. I don't think "comment" works properly - it's too small if you have multiple foreign key constraints. With regards, Martijn

RE: How to retrieve constraints and links from MySQL tables?

2004-11-26 Thread Mechain Marc
bre 2004 09:32 À : [EMAIL PROTECTED] Objet : How to retrieve constraints and links from MySQL tables? So, I'm running a MySQL database (version: 4.0.21) for a personal project of mine, and I would like to learn how to retrieve constraints and links from the table after it's been created

Re: How to retrieve constraints and links from MySQL tables?

2004-11-26 Thread Martijn Tonies
> So, I'm running a MySQL database (version: 4.0.21) for > a personal project of mine, and I would like to learn > how to retrieve constraints and links from the table > after it's been created. The create statements read > thusly: > When I run "show columns from employees", there is no > indicat

How to retrieve constraints and links from MySQL tables?

2004-11-26 Thread Varakorn Ungvichian
So, I'm running a MySQL database (version: 4.0.21) for a personal project of mine, and I would like to learn how to retrieve constraints and links from the table after it's been created. The create statements read thusly: CREATE TABLE positions ( position_id tinyint(4) DEFAULT '0' NOT NULL AUTO_