Introduction to DB2 for z/OS
Previous topic | Next topic | Contents | Glossary | Contact z/OS | PDF


Definition of columns in a table

Introduction to DB2 for z/OS

A column definition has two basic components, the column name and the data type. There are several factors that you need to consider when you define columns in a table.

The two basic components of the column definition are the name and the data type. A column contains values that have the same data type. If you are familiar with the concepts of records and fields, you can think of a value as a field in a record. A value is the smallest unit of data that you can manipulate with SQL. For example, in the EMP table, the EMPNO column identifies all employees by a unique employee number. The HIREDATE column contains the hire dates for all employees. You cannot overlap columns.

Online schema enhancements provide flexibility that lets you change a column definition. Carefully consider the decisions that you make about column definitions. After you implement the design of your tables, you can change a column definition with minimal disruption of applications.

Throughout the implementation phase of database design, refer to the complete descriptions of SQL statement syntax and usage for each SQL statement that you work with.





Copyright IBM Corporation 1990, 2010