View Single Post
Old 04-16-2006, 05:54 AM   #2 (permalink)
Silvy
paranoid
 
Silvy's Avatar
 
Location: The Netherlands
The problem with this is that you supply 5 values for 6 columns.
Apparently the SQL server cannot determine which value you're missing.**

Try using this statement:
Code:
insert into members set member_id=1, fname='firstname', lname='lastname', address='address', phone='12345'
This way you explicitly specify which values you're setting, and the server should take the default for all other columns.

**Think of it this way: if there are 2 columns with a default setting, how would the server know which value you didn't specify?
Only for the case where colums-with-default-values equals the number-of-missing-values is there a 'correct' way to parse the statement.

HTH
__________________
"Do not kill. Do not rape. Do not steal. These are principles which every man of every faith can embrace. "
- Murphy MacManus (Boondock Saints)
Silvy is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38