Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Weird scenario with INSERT
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01410932
Message ID:
01411036
Views:
37
>>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.
>

If it has a structure change aren't you going to want to populate the new field(s) on an insert?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform