All Forums Database
dak4sumit 1 post Joined 03/06
01 May 2006
how to get the primary indexes of all the tables in a user using dbc tables

how to get the primary indexes of all the tables in a user using dbc tables

TDUser-781 35 posts Joined 12/04
02 May 2006

Try this:select *from dbc.tableswhere databasename = '';If you query directly tablesx view, you'll get only the tables and views of the username you are logged in with.Hope this helps,Bye,TDUser

TDUser-781 35 posts Joined 12/04
02 May 2006

Ooopsss, sorry, I was wrong in posting the sql; you are asking about PI and not only tables.... :-) !Well, you may query dbc.indicesx view and look at indextype = 'p'.Bye!TDUser

BBR2 96 posts Joined 12/04
14 May 2006

You may want to use this SQLSEL* FROM DBC.IndicesWHERE IndexType IN ('P', 'Q);Where P - Accounts for NPPIand Q for PPI tablesVinay

You must sign in to leave a comment.