MySQL Forums
Forum List  »  Spanish

Re: Relaciones en MySQL 4.0.25-standard
Posted by: Juan Pablo Zapata
Date: August 28, 2007 07:00AM

ME ARROJÓ LOS SIGUIENTES MENSAJES

CREATE TABLE `Pais` (
`Id_pais` int(11) NOT NULL auto_increment,
`Nombre_pais` varchar(30) default NULL,
PRIMARY KEY (`Id_pais`)
) TYPE=InnoDB


CREATE TABLE `Ciudad` (
`Id_ciudad` int(11) NOT NULL auto_increment,
`Id_pais` int(11) NOT NULL default '0',
`Nombre_ciudad` varchar(30) default NULL,
PRIMARY KEY (`Id_ciudad`),
KEY `Id_pais` (`Id_pais`),
CONSTRAINT `Ciudad_ibfk_1` FOREIGN KEY (`Id_pais`) REFERENCES `Pais` (`Id_pais`)
) TYPE=InnoDB

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Relaciones en MySQL 4.0.25-standard
2645
August 28, 2007 07:00AM


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.