Databases Reference
In-Depth Information
We add a field named
genre
and define it as an
ENUM
. For now, we choose to put
short codes in the value list and make one of them,
'F'
, into the default value:
In the value list, we have to enclose each value within single quotes, unlike in the
default value field. In our design, we know that these values stand for
Fantasy
,
Child
,
and
Novel
, but for now we want to see the interface's behavior with short codes. In
the
Insert
panel, we now see a radio box interface:
If we decide to have more self-describing codes, we can go back to
Structure
mode
and change the definition for the
genre
field. In the following example, we do not
see the complete value list because the field is not large enough, but what we entered
was
'Fantasy','Child','Novel'
. We also have to change the default value to one of
the possible values, to avoid getting an error message while trying to save this file
structure modification.
With the modified value list, the
Insert
panel now looks as follows:
Observe that the radio buttons have been replaced by a drow-down list because the
possible values are longer.
Search WWH ::
Custom Search