oracle情况下:
select column_name
from user_cons_columns
wherE CONSTRAINT_NAME in (select CONSTRAINT_NAME
from user_constraints
where table_name = upper('&tab')
and CONSTRAINT_TYPE = 'P');
oracle情况下:
select column_name
from user_cons_columns
wherE CONSTRAINT_NAME in (select CONSTRAINT_NAME
from user_constraints
where table_name = upper('&tab')
and CONSTRAINT_TYPE = 'P');
转载于:https://my.oschina.net/artong999/blog/408202