Skip to content

Instantly share code, notes, and snippets.

@rodrigo-galba
Created September 15, 2011 13:04
Show Gist options
  • Save rodrigo-galba/1219175 to your computer and use it in GitHub Desktop.
Save rodrigo-galba/1219175 to your computer and use it in GitHub Desktop.
Oracle - info sobre PKS
SELECT * FROM all_constraints cons, all_cons_columns cols
WHERE cons.constraint_type = 'P'
AND cons.constraint_name = cols.constraint_name
AND cons.owner = cols.owner
AND cons.owner = 'my_scheme'
AND cols.TABLE_NAME = 'my_table'
ORDER BY cols.table_name, cols.position;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment