foreign key

J

Joanne

I have 2 tables, tblCourses and tblHoles

CourseID is primary key in tblCourses
HoleID is primary key in tblHoles

I need to put CourseID into tblHoles as a foreign key.

I know to use the relationships to relate Courseid from TblCourses to
CourseID as foreign key in tblHoles.

What I don't know is what data type does the foreign key need to be?

Thanks a bunch
Joanne
 
D

Dan Artuso

Hi,
It must be the same data type as CourseId in tblCourses, whatever that is.
 
S

Steve

CourseID in TblCourses should be autonumber (which is Long Integer) and
CourseID in all related tables should be Long Integer.

You ought to be out playing a round of golf this morning instead of workng
on your database. That would be sure to improve your game!
 
J

Joanne

Thanks fellas, and you're right Steve.
Playing is much more fun than this, but I must hang on until Monday.
Golf on
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top