Ver Mensaje Individual
  #2 (permalink)  
Antiguo 29/09/2009, 10:06
Avatar de huesos52
huesos52
Colaborador
 
Fecha de Ingreso: febrero-2009
Ubicación: Manizales - Colombia
Mensajes: 5.980
Antigüedad: 15 años, 2 meses
Puntos: 360
Respuesta: consulta con id repetidos opinion

Código mysql:
Ver original
  1. Query OK, 0 rows affected (0.00 sec)
  2.  
  3. mysql> create table tb2(id1 integer,id2 integer,id3 integer,id4 integer, id5 integer,
  4.     -> foreign key (id1) references tb1(id),foreign key (id2) references tb1(id),
  5.     -> foreign key (id3) references tb1(id),foreign key (id4) references tb1(id),
  6.     -> foreign key (id5) references tb1(id));
  7. Query OK, 0 rows affected (0.02 sec)

así todos los campos de tb2 estarán relacionados con tb1.

saludos
__________________
Without data, You are another person with an opinion.
W. Edwads Deming