Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programmatically create PRIMARY key with FOR clause
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00323092
Message ID:
00323644
Views:
24
>Bob & Randy,
>Here's a sample code (not the actual one I'm using, but much more readable):
>
>
CREATE DATA datTest
>CREATE TABLE tblTest (cKey C(1))
>ALTER TABLE tblTest ADD PRIMARY KEY cKey TAG cKey FOR .NOT.EMPT(cKey)
>
>Switching the order of the TAG/FOR clauses makes no difference.

This works for me:

CREATE DATA datTest
CREATE TABLE tblTest (cKey C(1))
ALTER TABLE tblTest ADD PRIMARY KEY cKey FOR NOT EMPT(cKey) TAG cKey


HTH,
BOb
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform