Click here to Skip to main content
15,898,134 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Team,
I have the following SQL information which i am not getting understand..

SQL
Constraint_Type     Constraint_Name                  Constraint_Keys
1   FOREIGN KEY   FK_K2ZTECFRDAILY_K2CFRMASTER     CFRMASTERID REFERENCES KAIZEN.dbo.K2CFRMASTER (ID)
3   FOREIGN KEY   FK_K2ZTECFRDAILY_K2FILELOG       FILELOGID REFERENCES KAIZEN.dbo.K2FILELOG (ID)
5   FOREIGN KEY   FK_K2ZTECFRDAILY_K2FILELOGID     FILELOGID REFERENCES KAIZEN.dbo.K2FILELOG (ID)


Please anybody can explain me the above process .What does it mean ?? for which column have set the foreign key?? How it works??.As I am new for this .please let me know.

Thanks
Harshal
Posted

Read it:
FOREIGN KEY - Ensure the referential integrity of the data in one table to match values in another table

http://www.w3schools.com/sql/sql_constraints.asp[^]
 
Share this answer
 
v2
Comments
[no name] 28-Apr-14 5:15am    
I got your point King_Fisher But how to identify for which column foreign key was set in Constraint_Keys Column in the above information??
[no name] 28-Apr-14 5:41am    
Thank you so much .I got the constraint list from my manager, it get solved.
For the first example

CFRMASTERID of current table is defined as foreign key having constraint name as FK_K2ZTECFRDAILY_K2CFRMASTER which is present in K2CFRMASTER Table of KAIZEN database having column name as ID.
 
Share this answer
 
Comments
[no name] 30-Apr-14 5:25am    
ohh . i got it
Thank you so much Rahul Gunjal.

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