Download Pervasive.SQL V8 User's Guide

Transcript
Table Designer
between Btrieve data types and SQL data types. See “Data Types” on
page 5-6.
Data Types
Refer to “Pervasive.SQL Supported Data Types” on page A-2 in SQL
Engine Reference for a list of the data types supported by the database
engine. That section lists the Pervasive.SQL data types for the
transactional and relational interfaces and the equivalent ODBC
data types. You may use any data types listed in “Pervasive.SQL
Supported Data Types” and that appear in the “Type” selection list
on the Columns tab or the Btrieve tab.
The following data types are supported by the relational interface as
read-only data types. They cannot be created in an SQL statement.
n
n
n
n
Null Values
LVAR
NOTE
WSTRING
WZSTRING
The ability to modify the null attribute of a column is subject to the
following restrictions:
n
n
n
The target column cannot have a PRIMARY/FOREIGN KEY
constraint defined on it.
If converting the old type to the new type causes an overflow
(arithmetic or size), the ALTER TABLE operation is aborted.
If a nullable column contains NULL values, the column cannot
be changed to a non-nullable column.
If you must change the data type of a key column, you can do so by
deleting the index key, changing the data type, and re-adding the key.
Keep in mind that you must ensure that all associated index key
columns in the database remain synchronized.
For example, if you have a primary index key in table T1 that is
referenced by foreign keys in tables T2 and T3, you must first delete
the foreign keys. Then you delete the primary key and change all
three columns to the same data type. Finally, you must re-add the
primary key and then the foreign keys.
For additional information on nulls, see the following:
n
n
5-6
“Null Conversion” on page 15-2 in Advanced Operations Guide
“INSERT” on page 3-85 in SQL Engine Reference