Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How may I change order of a field in a table ?
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00439283
Message ID:
00439373
Views:
15
>>I alredy know the command ALTER TABLE .... to modify a table. I'm able to add fields, but they are always added as the last field. I would like to know how to insert a field at the position I want or to only change the position of an existing field. Of course, I want to do this by programmation...

>About 3 months ago I had the similar problem and thread. I think, there is no way to change order of the fields rather than manually re-arrange them.
This is just an idea, but should work:
- Use AFIELDS()
- AINS() rows corrsponding to new fields.
- create a new table
- APPEND FROM exisitng table (fields with matching names should be mapped correctly)
- delete the current table
- and finally rename the new table.
censored.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform