Created
October 31, 2019 09:23
-
-
Save BirgittaHauser/1d57fda8d7af74bbf0d8607d80d79431 to your computer and use it in GitHub Desktop.
Determine DDS described physical files containing Unique Keys
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Determine DDS described physical files with unique Keys | |
Select a.* | |
From syspartitionIndexstat a | |
Where Table_Schema = 'YOURSCHEMA' | |
and Index_Type = 'PHYSICAL' | |
and UNIQUE = '0'; |
For determining DDS described physical files with a non-unique key, UNIQUE = '2' must be checked.
-- Determine DDS described physical files with non-unique Keys
Select a.*
From syspartitionIndexstat a
Where Table_Schema = 'YOURSCHEMA'
and Index_Type = 'PHYSICAL'
and UNIQUE = '2';
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Determine DDS described physical files containing Unique Keys