Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Primary keys
Message
From
22/11/2001 01:51:17
 
 
To
22/11/2001 01:36:02
Jimi Lee
Pop Electronic Products Ltd.
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00584816
Message ID:
00584820
Views:
30
This message has been marked as the solution to the initial question of the thread.
>hi all,
>
>can someone show me a simple SQL statment to create a table with 2 primary keys?
>
>thanks a lot!
>Jimi

You can't create a table with two primary keys, only one per table is allowed. What you can do is create a candidate key (field with a candidate index), which functions in a similar way as a primary key. A sample statement to do that would be:
CREATE TABLE mypktest (iid i PRIMARY KEY, ssn c(10) UNIQUE)
Uniqueness is enforced on both a primary key and a candidate key. HTH
Previous
Reply
Map
View

Click here to load this message in the networking platform