View Single Post
  #5 (permalink)  
Old March 28th, 2011, 06:07 AM
disel2010 disel2010 is offline
Authorized User
Points: 448, Level: 7
Points: 448, Level: 7 Points: 448, Level: 7 Points: 448, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2011
Posts: 86
Thanks: 1
Thanked 12 Times in 12 Posts
Default

Hi Arbab,

sorry to hear my post wasn't clear.
I was trying to show by example when (and when not) the default value comes into play.
To clarify, please note:
- that the default value only comes into play when a column isn't specified in an INSERT statement...
- that as soon as you do specify a column with a default value, you are overwriting the default value

Also, it's only when you are actually inserting records that the default value can come into play.. The moment you created your table with the DDL statement you only have the metadata describing your database object, not the data itself yet...
The Following User Says Thank You to disel2010 For This Useful Post:
arbab (March 29th, 2011)