- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What are the default values used by DB2 for various data types?
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 |
---|---|
CHAR | Spaces |
Varchar | Empty string having length 0 |
TIMESTAMP | Current timestamp |
INTEGER | Zero |
Advertisements