MySQL Forums
Forum List  »  MySQL Query Browser

contraint foreign key?
Posted by: chris chia
Date: June 20, 2005 09:46PM

hi, i have some difficulties in constrainting some foreign key.

CREATE TABLE `tex_type` (
`tex_type_id` int(10) unsigned NOT NULL auto_increment,
`tex_type_name` varchar(255) NOT NULL default '',
PRIMARY KEY (`tex_type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `tex_name` (
`tex_name_id` int(10) unsigned NOT NULL auto_increment,
`tex_type_id` int(10) unsigned NOT NULL default '0',
`tex_name_name` varchar(255) NOT NULL default '',
PRIMARY KEY (`tex_name_id`),
KEY `FK_tex_name_1` (`tex_type_id`),
CONSTRAINT `FK_tex_name_1` FOREIGN KEY (`tex_type_id`) (REFERENCES `tex_type` (`tex_type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


1st question: this sql command works on phpMyAdmin as it does show on the insert table page. However, the foreign key does not show up on the browser table. Do i still have to manually key in the entry or can i have a drop down selection just like from the phpMyAdmin?

2nd question: is that i would like the foreign key to display both `tex_type_id` and `tex_type_name` as that will greatly enhance by work flow.


would greatly appreciate your help

Options: ReplyQuote


Subject
Written By
Posted
contraint foreign key?
June 20, 2005 09:46PM
June 27, 2005 04:22AM
June 29, 2005 07:28PM
July 02, 2005 12:50AM
July 04, 2005 08:18PM


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.