ALLBASE/SQL Reference Manual (36216-90216)

Chapter 2 67
Using ALLBASE/SQL
Defining How Data is Stored and Retrieved
You cannot use the DEFAULT option for a LONG data type column.
Specifying a DBEFileSet
The table rows are stored in the DBEFiles previously associated with the DBEFileSet
named in the IN clause of the CREATE TABLE statement. If you do not specify a
DBEFileSet, rows for the table are stored in the SYSTEM DBEFileSet. For best
performance, explicitly specify a DBEFileSet other than the SYSTEM DBEFileSet.
Specifying Native Language Tables and Columns
Use the LANG =
TableLanguageName
option in the CREATE TABLE statement to specify a
language other than the DBEnvironment's language. You can only specify NATIVE 3000
or the current native language of the DBEnvironment.
CREATE TABLE NewTable
LANG = "NATIVE 3000"
(Column1 char(20),
Column2 char(10))
You must use double quotes around the name “NATIVE 3000” because it contains a
hyphen. Normally, native language names do not require quotes. For more information on
naming rules, refer to the “Names” chapter.
Use the LANG =
ColumnLanguageName
option in the column definitions of the CREATE
TABLE statement to specify a column with a language different from that of the table as a
whole. For example:
CREATE TABLE NewTable
(Column1 char(20) LANG = "NATIVE 3000",
Column2 char(20))
Sorting and pattern matching follow the rules of the column language. In order to
maintain ASCII performance as much as possible, NATIVE 3000 column sorting and
matching are done in ASCII.
By default, the language of a new table is the language of the DBEnvironment, and the
language of a new column is the language of the table it belongs to.
Creating a View
A view is a table derived by placing a “window” over one or more tables to let users or
programs see only certain data. Views are useful for limiting data visibility; they are also
useful for pulling together data from various tables for easier use. The tables from which
data for the view is derived are called base tables.
You define a view with the CREATE VIEW statement. The following are components of a
view definition:
1. Name of the view
2. Name of its columns
3. Definition of how to derive data for the view