Skip to content

Instantly share code, notes, and snippets.

@tsilvonen
Last active January 19, 2021 06:20
Show Gist options
  • Save tsilvonen/9ef41eb50d442db3dc3a1b289e936a22 to your computer and use it in GitHub Desktop.
Save tsilvonen/9ef41eb50d442db3dc3a1b289e936a22 to your computer and use it in GitHub Desktop.
SELECT
t.Xf$Name AS TableName,
i.Xi$Number AS IndexNumber,
i.Xi$Part AS FieldNumber,
f.Xe$Name AS FieldName
FROM X$File t
INNER JOIN X$Index i ON
i.Xi$File=t.Xf$Id
INNER JOIN X$Field f ON
f.Xe$Id=i.Xi$Field
WHERE
Xf$Name='TABLE_NAME'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment