MySQL Forums
Forum List  »  Spanish

Re: Persistente error nº 150 de MySQL
Posted by: Jesús Uzcanga
Date: March 17, 2015 01:29PM

Prueba cambiando el formato de las referencias:


create table
compras_lin
(id int auto_increment primary key,
NCompra int not null default 1,
Articulo int(6) not null default 1,
Descipcion char(20) default '',
Cantidad double(8,2) default 1.00,
Precio double (9,2) default 0.00,
Descuento float(4,1) default 0.0,
Tipo_IVA tinyint(3) not null default 1,
Neto double(9,2) default 0.00,
CONSTRAINT `NCompra_id` FOREIGN KEY (`NCompra`) REFERENCES `compras_cab` (`id`) ON UPDATE CASCADE,
CONSTRAINT `Articulo_id` FOREIGN KEY (`Articulo`) REFERENCES `articulos` (`id`) ON UPDATE CASCADE,
CONSTRAINT `Tipo_IVA_id` FOREIGN KEY (`Tipo_IVA`) REFERENCES `tipos_iva` (`id`) ON UPDATE CASCADE)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8;

___________________________
Ing. Jesús Alfredo Uzcanga
Twitter: @JesusUzcanga

We learn the 20% of what we HEAR,
the 50% of what we SEE,
the 80% of what we DO and
the 95% of what we TEACH.

____________________________________________________________
https://www.linkedin.com/in/jauzcanga/

Options: ReplyQuote


Subject
Views
Written By
Posted
2234
March 17, 2015 06:45AM
Re: Persistente error nº 150 de MySQL
714
March 17, 2015 01:29PM


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.