I'm starting with SQL and I wanted to know if it is possible to place several foreign keys from one table to a primary key from another table, I have something like this
create table producto(
llave int primary key auto_increment,
producto varchar (100));
create table ventas(
clave int primary key auto_increment,
fk_producto1 int,
fk_producto2 int,
fk_producto3 int,
fk_producto4 int,
fk_producto5 int,
foreign key (fk_producto1) references producto (llave),
foreign key (fk_producto2) references producto (llave),
foreign key (fk_producto3) references producto (llave),
foreign key (fk_producto4) references producto (llave),
foreign key (fk_producto5) references producto (llave));
The code is in MySql and if you can run it without any problem, but I can not make the query and leave me data that are outside the primary key of the product table, I appreciate