Page 1 of 1

foreign key

Posted: Fri Nov 04, 2005 7:13 am
by sebs
I have ID in table1 and IDm in table2,ID is primary key in it's table.Is there anyway I can make a relation between those 2 keys so the compare between them works faster(foreign key or...)?

Posted: Fri Nov 04, 2005 9:06 am
by prima-nocte

Posted: Fri Nov 04, 2005 9:19 am
by sebs
i WILL use join but for the join to work faster?IDm is not primary key.Instead of making a index on ID and IDm can I write something like IDm has foreign key ID?

Posted: Fri Nov 04, 2005 9:52 am
by prima-nocte
not to my knowledge.. I would use the index on them and put them together with the JOIN.. (and if my english was any better i could explain why ;) )