Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Reference » Views » Consolidated views

SYSGROUPS consolidated view Next Page

SYSINDEXES consolidated view

Each row in the SYSINDEXES view describes one index in the database. As an alternative to this view, you could also use the SYSIDX and SYSIDXCOL system views.

The tables and columns that make up this view are provided in the SQL statement below. To learn more about a particular table or column, use the links provided beneath the view definition.

  as select up.user_name,idx.index_name,
    if idx."unique" = 'N' then 'Non-unique' else
      if idx."unique" = 'U' then 'UNIQUE constraint' 
      else 'Unique' endif
    (select list(string(c.column_name,
      if ixc."order" = 'A' then ' ASC' else ' DESC' endif) 
       order by ixc.table_id asc,ixc.index_id asc,ixc.sequence asc) 
      from SYS.ISYSIDXCOL as ixc join SYS.ISYSTABCOL as c on(
      c.table_id = ixc.table_id and
      c.column_id = ixc.column_id) where
      ixc.index_id = idx.index_id and
      ixc.table_id = idx.table_id), 0,0 from
    SYS.SYSTABLE as tab key join
    SYS.SYSFILE as file key join
    SYS.SYSINDEX as idx join
    SYS.SYSUSERPERM as up on up.user_id = idx.creator
See also