becks22
15th September 2008, 07:45
I need to clear my concept of refers to ...Wat does refers to do ..I knw the simple meaning that it is used to join 2 tables via primary n foreign keys .But need to knw wats the difference between the vice versa statements
For eg
Table1 refers to table2
Table 2 refers to table1
wats the difference between the two statements

zardoz
15th September 2008, 09:52
Table1 has foreign key (or fields of the primary key of table2).
Table2 is referred by primary key.
The only way to do the join is in this way:

Table1.fields refers to Table2.primaryindex

You cannot do vice-versa.

becks22
15th September 2008, 10:02
thanks sir

I think i got the concept ..But 1 thing more sir ..if table 1 has order number as primary key and table 2 also has order number,,then hw willl i use the refer function

zardoz
15th September 2008, 16:06
Sure, if both tables have the same primary index, this is true, you can refer one to other and vice versa.

becks22
15th September 2008, 16:08
Thanx sir ...