Hello,

> I have problem in naming foreign key constraints :

--8<--

> Actually, the name for the just created constraint is an 'internally
> generated id'  (i.e :0_023), so the update script can't find the named
> constraint 'fktblnumb'
>
> The "show create table tblnumbers" outputs :
>
> CREATE TABLE `tblnumbers` (
>   `numid` int(11) NOT NULL auto_increment,
>   `nameid` int(11) default NULL,
>   `phone` varchar(20) default NULL,
>   PRIMARY KEY  (`numid`),
>   KEY `nameid` (`nameid`),
>   CONSTRAINT `0_23` FOREIGN KEY (`nameid`) REFERENCES `tblphone`
(`nameid`),
> ) ENGINE=InnoDB DEFAULT CHARSET=latin1
>
>
> Any idea about this behaviour ?

Yes, MySQL parses the named constraint, but doesn't apply
it and creates its own constraint name.

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to