What are the default values used by DB2 for various data types?

DB2DatabaseBig Data Analytics

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 typeDB2 Default value
VarcharEmpty string having length 0
TIMESTAMPCurrent timestamp
Published on 14-Sep-2020 14:20:04