|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Friday, October 26, 2012 11:59 PM
Points: 579,
Visits: 87
|
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Thursday, October 04, 2012 9:20 AM
Points: 583,
Visits: 1,060
|
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Yesterday @ 8:16 AM
Points: 1,234,
Visits: 1,394
|
|
I came across the Insert Default Values when I taught a SQL class, many years back. It was an odd way to start a chapter on data modification statements. It is mostly useful for trivia contests, to be honest.
The best explanation I can come up with, for where it might be used, is in a situation -- like a call center -- where you want to latch an identity, but don't have enough data to fill in the blanks. There might be some uses around logging, but usually there is more to be recorded.
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Tuesday, April 30, 2013 9:07 PM
Points: 1,529,
Visits: 824
|
|
Note that
insert into TableName default values should not be confused with
insert into TableName (columnName) values(default) The latter of which is not valid for an identity column.
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Friday, February 04, 2011 7:20 AM
Points: 977,
Visits: 1,499
|
|
I can't picture ever using this knowledge, but learning it is still cool.
Tom Garth Vertical Solutions
"There are three kinds of men. The one that learns by reading. The few who learn by observation. The rest of them have to pee on the electric fence for themselves." -- Will Rogers
|
|
|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Yesterday @ 5:19 PM
Points: 53,
Visits: 227
|
|
gezz,, I am missing the point of this. I thought the User needs to insert data ?
|
|
|
|