IBM Books

SQL Getting Started


Tables

Tables are logical structures made up of a defined number of columns and a variable number of rows. A column is a set of values of the same data type. The rows are not necessarily ordered within a table. To order the result set, you have to explicitly specify ordering in the SQL statement which selects data from the table. At the intersection of every column and row is a specific data item called a value. In Figure 1, 'Sanders' is an example of a value in the table.

A base table is created with the CREATE TABLE statement and is used to hold user data. A result table is a set of rows that the database manager selects or generates from one or more base tables to satisfy a query.

Figure 1 illustrates a section of a table. Columns and rows have been marked.

Figure 1. Visualization of a Table


REQTEXT


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]