使用SQL查看表的主键:
select column_name from user_cons_columns wherE CONSTRAINT_NAME in (select CONSTRAINT_NAME from user_constraints where table_name ='TABLE_NAME' and CONSTRAINT_TYPE='P');