|
Posted by Paul on 04/19/07 14:45
Hi,
I am writing an in house utility to attempt to compare different
aspects of databases.
I am currently writing the queries to list all of the indexes in the
database (including primary key indexes at present - I may move these
and compare separately at some point).
I would like the following information, in one result set if possible:
Table Name
Index Name
Column Name
Column Position
Unique?
Now on Oracle, this is easily done with the following query:
SELECT IND.TABLE_NAME, IND.INDEX_NAME, IND.COLUMN_NAME,
IND.COLUMN_POSITION, COL.UNIQUENESS
FROM USER_IND_COLUMNS IND,
USER_INDEXES COL
WHERE IND.INDEX_NAME = COL.INDEX_NAME
ORDER BY 1, 2, 3, 4, 5
I have been trying for over an hour now to get the equivalent, and I
really cannot figure it out. If anybody can come up with this then I
would greatly appreciate it!
Many Thanks,
Paul
Navigation:
[Reply to this message]
|