How to get primary key of a table from Oracle

by

SELECT cols.column_name
FROM all_constraints cons, all_cons_columns cols
WHERE cons.constraint_type = 'P'
AND cons.constraint_name = cols.constraint_name
AND cons.table_name = cols.table_name
AND cons.owner = cols.owner
AND cons.table_name='my_table_name'
AND cons.owner='my_schema_name'

See also:

How to get primary key of a table from PostgreSQL

How to get primary key of a table from SQLite

How to get primary key of a table from MySQL

How to get primary key of a table from SQL Server

How to get primary key of a table from DB2

Some Oracle tools you can try: https://www.withdata.com/oracle/