ATTRIBUTE-TYPE
Prev | Functional Data Definition Language (FDDL) | Next

## Name

ATTRIBUTE-TYPE — Returns the type of the supplied attribute.Function

## Syntax

          attribute-type attribute table &key owner database => type, precision, scale, nulls-accepted

## Arguments and Values

`attribute`

  The name of the index as a string, symbol or SQL expression.

`table`

  The name of a table as a string, symbol or SQL expression.

`owner`

  A string, `NIL` or :all.

`database`

  A database object which defaults to *default-database*.

`type`

  A keyword symbol denoting a vendor-specific SQL type.

`precision`

  An integer denoting the precision of the attribute type or `NIL`.

`scale`

  An integer denoting the scale of the attribute type or `NIL`.

`nulls-accepted`

  0 or 1.

## Description

Returns a keyword symbol representing the vendor-specific field type of the supplied attribute `attribute` in the table specified by `table` in `database` which defaults to *default-database*. `owner` is `NIL` by default which means that the attribute specified by `attribute`, if it exists, must be user owned else `NIL` is returned. If `owner` is a string denoting a user name, the attribute, if it exists, must be owned by `owner` else `NIL` is returned, whereas if `owner` is :all then the attribute, if it exists, will be returned regardless of its owner.

Other information is also returned. The second value is the type precision, the third is the scale and the fourth represents whether or not the attribute accepts null values (a value of 0) or not (a value of 1).

## Examples

    (attribute-type [emplid] [employee])
    => :INT4, 4, NIL, 0

## Side Effects

None.

## Affected by

*default-database*

## Exceptional Situations

None.

## See Also

`list-attributes`
`list-attribute-types`

## Notes

None.

Prev | Up | Next
INDEX-EXISTS-P | Home | LIST-ATTRIBUTE-TYPES