MySQL Forums
Forum List  »  MySQL Administrator

Foreign keys disappear :|
Posted by: Armen Zourabian
Date: November 17, 2004 12:27PM

Hi All!

How can I see what foreign keys I have in my tables ? MySQL Administrator doesn't show anything, the list is just empty, although I executed SQL to create two tables once of which has a foreign key referencing a field in the first table. MySQL QUery Browser doesn't show anything either. It just seems that I add the keys, but when I view the tables, they are not shown, even though the server holds the integrity (integrity is maintained). I cannot delete any foreign keys for this very reason, because I cannot see them :| And I dont (yet) want to write my own DROP FOREIGN KEY syntax, because I am not very good in SQL.

Here are the two SQL expressions, which create two tables mentioned:

CREATE TABLE exmpl5 (
id INT NOT NULL,
val TEXT,
UNIQUE (id)
) TYPE=InnoDB;

CREATE TABLE exmpl6 (
id INT,
blah TEXT,
INDEX(id),
CONSTRAINT id_fkey FOREIGN KEY (id)
REFERENCES exmpl5(id) ON DELETE NO ACTION
) TYPE=InnoDB;

I executed them in MySQL Query Browser.

Amn.

Options: ReplyQuote


Subject
Written By
Posted
Foreign keys disappear :|
November 17, 2004 12:27PM
November 19, 2004 01:45PM
December 01, 2004 01:46PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.