The function
list-attribute-types
returns type information for the attributes in the table given by
table
.
database has a default value of *default-database*.
If
owner
is
nil
, only user-owned attributes are considered. This is the default.
If
owner
is
:all
, all attributes are considered.
If owner is a string, this denotes a username and only attributes owned by owner are considered.
result is a list in which each element is a list ( attribute datatype precision scale nullable ). attribute is a string denoting the atribute name. datatype is the vendor-specific type as described in attribute-type. nullable is 1 if the attribute accepts the value NULL, and 0 otherwise.
To print the type of every attribute in the database, do
(loop for tab in
(sql:list-tables)
do
(loop for type-info in
(sql:list-attribute-types tab)
do
(format t "~&Table ~S Attribute ~S Type ~S"
tab
(first type-info)
(second type-info))))