上面的这个画面是从STRSQL命令中导出来的,具体的步骤如下:
1.在AS/400的命令行上如数STRSQL
2.CREATE TABLE, 按F4功能键。
3.在“Type”的位置按F1功能键,就会弹出您所需的这个界面了。
这是AS/400数据库所支持的所有数据类型。
5770SS1 V7R2M0 140418 HELP 09/08/20 19:53:03 Page 1
Type - Help
Select the type of data. The possible choices are:
INTEGER (INT)
A large integer. If INTEGER is selected, do not
specify Length and Scale.
SMALLINT
A small integer. If SMALLINT is selected, do not
specify Length and Scale.
BIGINT
A big integer. If BIGINT is selected, do not specify
Length and Scale.
FLOAT
A floating-point number. If FLOAT is selected,
precision ( Length ) should be specified but not
Scale. If Length is between 1 and 24 inclusive, the
format is that of single precision floating-point.
If Length is between 25 and 53 inclusive, the format
is that of a double precision floating-point. If
Length is not specified, the default is 52. If a
single precision floating-point (REAL) or a double
precision floating-point (DOUBLE PRECISION) is
specified, do not specify Length and Scale.
DECFLOAT
A decimal floating-point number. If DECFLOAT is
selected, precision ( Length ) should be specified
but not Scale. Length of 16 or 34 is allowed and if
it is not specified, then the default is 34.
NUMERIC
A zoned decimal number. The first integer is the
precision of the number (total number of digits)
which can range from 1 to 63. The second integer is
the scale of the number (number of digits to the
right of the decimal point) which can range from 0 to
the precision. If NUMERIC is selected, precision (
Length ) and Scale should be specified. If you
specify Length, but not Scale, the default for Scale
is 0. If you omit both Length and Scale, the default
for Length is 5 and the default for Scale is 0.
DECIMAL (DEC)
A decimal number. The first integer is the precision
of the number (the total number of digits) which can
range from 1 to 63. The second integer is the scale
of the number (the number of digits to the right of
the decimal point) which can range from 0 to the
precision. If DECIMAL is selected, precision (
Length ) and Scale is specified. If you specify
Length, but not Scale, the default for Scale is 0.
If you omit both Length and Scale, the default for
Length is 5 and the default for Scale is 0.
CHARACTER (CHAR)
Page 2
A fixed-length character string. The length
(specified by an integer) can range from 1 to 32766
(32765 if null capable). For mixed-data, the range
is 4 to 32766 (32765 if null capable). If precision
( Length ) is omitted, 1 character is the default.
If CHAR is selected, Length can be specified but not
Scale.
VARCHAR (CHARACTER VARYING, CHAR VARYING)
A variable-length character string. All values of
the string have the same maximum length, determined
by the length attribute of the column. The length
must be specified as an integer. Length can be from
1 to 32740 (32739 if null capable).
LONG VARCHAR (not valid for DECLARE PROCEDURE)
A variable-length character string whose maximum
length is determined by the amount of space available
in the row.
BINARY
A fixed-length binary string. The length (specified
by an integer) can range from 1 to 32766 (32765 if
null capable). If precision ( Length ) is omitted, a
length of 1 is the default. If BINARY is selected,
Length can be specified but not Scale.
VARBINARY (BINARY VARYING)
A variable-length binary string. All values of the
string have the same maximum length, determined by
the length attribute of the column. The length must
be specified as an integer. Length can be from 1 to
32740 (32739 if null capable).
DATE
A three-part value (year, month, day) designating a
point in time under the Gregorian calendar. The
range of the year part is 1 to 9999, beginning with
the year 1 A.D. The range of the month part is 1 to
仅供参考。
收起