LIST-INDEXES
Prev | Functional Data Definition Language (FDDL) | Next

## Name

LIST-INDEXES — Returns a list of database indexes.Function

## Syntax

          list-indexes &key onowner database => result

## Arguments and Values

`owner`

  A string, `NIL` or :all.

`database`

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

`on`

  The name of a table as a string, symbol or SQL expression, a list of such names or `NIL`.

`result`

  A list of strings.

## Description

Returns a list of strings representing index names in `database` which defaults to *default-database*. `owner` is `NIL` by default which means that only indexes owned by users are listed. If `owner` is a string denoting a user name, only indexes owned by `owner` are listed. If `owner` is :all then all indexes are listed.

The keyword argument `on` limits the results to indexes on the specified tables. Meaningful values for `on` are `NIL` (the default) which means that all tables are considered, a string, symbol or SQL expression representing a table name in `database` or a list of such table identifiers.

## Examples

    (list-indexes)
    => ("employeepk" "companypk" "addrpk" "bar")

    (list-indexes :on '([addr] [company]))
    => ("addrpk" "companypk")

## Side Effects

None.

## Affected by

*default-database*

## Exceptional Situations

None.

## See Also

`create-index`
`drop-index`
`index-exists-p`

## Notes

`list-indexes` is a CLSQL extension.

Prev | Up | Next
DROP-INDEX | Home | INDEX-EXISTS-P