DB2 provides a facility to insert a default value in case the user does not give any value for the column. For each DB2 data type there is a fixed default value which will be assigned to the column (which was defined with ‘DEFAULT’ parameter during table creation) if the value is not given during insertion.
Below table gives the DB2 default values for CHAR, VARCHAR, TIMESTAMP and INTEGER.
|Data type||DB2 Default value|
|Varchar||Empty string having length 0|