Skip to content

Instantly share code, notes, and snippets.

@abhishekmishragithub
Created March 14, 2024 10:29
Show Gist options
  • Save abhishekmishragithub/e8de7ae52e06ef1e5f419ac68b732aee to your computer and use it in GitHub Desktop.
Save abhishekmishragithub/e8de7ae52e06ef1e5f419ac68b732aee to your computer and use it in GitHub Desktop.
select * from information_schema.key_column_usage
where constraint_catalog=current_catalog and table_name='your_table_name'
and position_in_unique_constraint notnull;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment