Click here to Skip to main content
15,899,754 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have 2 tables one for 'stagiaires' : with culomns : id,firstName,lastName,Sexe
second for 'ficheStagiaire' with culomns : id_fiche,DateSelectionnement,DateRemise,DateValidation
and I have a window which i show data from the first table but i dont know how to join data for every 'stagiaire'
Posted
Comments
M-osab 15-Aug-14 19:14pm    
I think that i should use foreign key but i dont know how ?!
Dilan Shaminda 15-Aug-14 21:49pm    
what is the relationship between 'stagiaires' and 'ficheStagiaire' tables?

1 solution

There must be some kind of relationship between the two tables through a common field, i.e. primary key on one table and foreign key on the other. Once this relationship is established, you can use JOIN to retrieve related records from these two tables.:
Refer:
1. Foreign-Keys-In-Microsoft-Sql-Server[^]
2. Visual Representation of SQL Joins[^]
 
Share this answer
 
Comments
M-osab 16-Aug-14 11:54am    
thnks a lot
Peter Leow 16-Aug-14 21:27pm    
You are welcome.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900