Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How create a primary index that combine 2 fields?
Message
From
28/06/2005 00:20:00
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
27/06/2005 21:46:02
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01026906
Message ID:
01026925
Views:
18
>I have a table called Enroll with fields stud_id and course_code.
>I want to set both of them as primary key.
>Is there any way yo do it? coz i don't know how to select 2 fields for the expression of the primary index. thanks

You might also consider using a serial number as primary key. That way, the foreign key in other tables is shorter, joins are simpler, and you don't have to propagate changes made by the user.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform