Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Modify Structure
Message
De
08/01/2002 07:42:05
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
08/01/2002 07:19:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00601864
Message ID:
00601870
Vues:
16
>Hello,
>
>Is there a way to insert a field into an existing table? I do not mean appending a field with: "ALTER TABLE xx ADD COLUMN yy"
>
>With "MODIFY STRUCTURE" you do can insert a field, but I need to do it with code, could anybody please help me out?
>
>Thanx in advance
>Ron

The built-in command ALTER TABLE ... ADD COLUMN adds the column at the end. There is no built-in BEFORE FieldX or AFTER Fieldx clause.

As a workaround, you can create a new table and APPEND FROM (see also: COPY STRUCTURE EXTENDED).

When I modify my structures, I do the changes manually (i.e., in the table designer), and use a program to APPEND FROM for modified tables. For production data, this program is run at midnight.

HTH, Hilmar.
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)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform