Oracle 5.0 Reference Manual page 2158

Table of Contents

Advertisement

• To check for
BLOB
MYSQL_TYPE_TIMESTAMP. (The
and
values are returned as strings. For these, check that the
ENUM
SET
MYSQL_TYPE_STRING
indicates that a column is numeric. This includes columns with a type of
NUM_FLAG
MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY, MYSQL_TYPE_SHORT, MYSQL_TYPE_LONG,
MYSQL_TYPE_FLOAT, MYSQL_TYPE_DOUBLE, MYSQL_TYPE_NULL, MYSQL_TYPE_LONGLONG,
MYSQL_TYPE_INT24, and MYSQL_TYPE_YEAR.
NO_DEFAULT_VALUE_FLAG
This does not apply to
columns (which have an implied default value).
AUTO_INCREMENT
added in MySQL 5.0.2.
The following example illustrates a typical use of the
if (field->flags & NOT_NULL_FLAG)
printf("Field can't be null\n");
You may use the convenience macros shown in the following table to determine the boolean status
of the
value.
flags
Flag Status
IS_NOT_NULL(flags)
IS_PRI_KEY(flags)
IS_BLOB(flags)
unsigned int decimals
The number of decimals for numeric fields.
unsigned int charsetnr
An ID number that indicates the character set/collation pair for the field.
To distinguish between binary and nonbinary data for string data types, check whether the
value is 63. If so, the character set is binary, which indicates binary rather than
charsetnr
nonbinary data. This enables you to distinguish
the
types from the
BLOB
values are the same as those displayed in the
charsetnr
statement or the
ID
information sources to see which character set and collation specific
mysql>
SHOW COLLATION WHERE Id = 63;
+-----------+---------+----+---------+----------+---------+
| Collation | Charset | Id | Default | Compiled | Sortlen |
+-----------+---------+----+---------+----------+---------+
| binary
| binary
+-----------+---------+----+---------+----------+---------+
mysql>
SELECT COLLATION_NAME, CHARACTER_SET_NAME
->
FROM INFORMATION_SCHEMA.COLLATIONS WHERE ID = 33;
+-----------------+--------------------+
| COLLATION_NAME
| CHARACTER_SET_NAME |
+-----------------+--------------------+
| utf8_general_ci | utf8
+-----------------+--------------------+
C API Data Structures
or
values, check whether
TIMESTAMP
BLOB_FLAG
and that the
ENUM_FLAG
indicates that a column has no
columns (because such columns have a default of NULL), or to
NULL
Description
True if this field is defined as
True if this field is a primary key
True if this field is a
field->type
types.
TEXT
column of the
INFORMATION_SCHEMA COLLATIONS
| 63 | Yes
| Yes
|
2138
is
type
MYSQL_TYPE_BLOB
and
TIMESTAMP_FLAG
or
flag is set in the
SET_FLAG
DEFAULT
NO_DEFAULT_VALUE_FLAG
value:
flags
or
BLOB
TEXT
instead)
from CHAR,
BINARY
VARBINARY
column of the
Id
charsetnr
|
1 |
or
flags are unneeded.)
value is
type
value.
flags
clause in its definition.
NOT NULL
(deprecated; test
from VARCHAR, and
SHOW COLLATION
table. You can use those
values indicate:
was

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents