Chapter 3 DBMS Reference Guide
Reverse engineering query for obtaining the alternate key indexes of a table by ODBC.
In Sybase Adaptive Server Anywhere 6:
select distinct I.INDEX_NAME from SYSINDEX I, SYSUSERPERMS U, SYSTABLE T where I."UNIQUE" = 'U' and I.TABLE_ID = T.TABLE_ID and T.TABLE_NAME = '%TABLE%' and T.CREATOR = U.USER_ID and U.USER_NAME = '%USER%'
Copyright (C) 2005. Sybase Inc. All rights reserved. |