Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Weird scenario with INSERT
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01410932
Message ID:
01411030
Vues:
40
>Jon, what is the reason for not specifying all columns in the INSERT? That is the standard way and then you don't have to worry about mystery values getting in.

Mike,

I understand where you're coming from on this, and it's certainly a valid way to resolve what we've been seeing.

The main argument I see against this is that if the table in question ever has a structure change, then we would have to make at least one source code change to take into account the structure change, which isn't a very dynamic way to handle things. Given how I've always understood the INSERT command to work, you should not need to specify all fields in the field/value list, because the default values should kick in for all fields that are not specified. If I would be specifying all fields all the time, then I feel there's really no point in supporting default field values.

Jon
Jon Rosenbaum
Devcon Drummer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform