select a.owner, a.table_name, a.column_name, a.data_type, d.constraint_type, a.num_nulls from all_tab_columns a left join ( select b.owner, b.TABLE_NAME, column_name, constraint_type from all_cons_columns b join all_constraints c on b.CONSTRAINT_NAME=c.CONSTRAINT_NAME and b.table_name=c.table_name and b.owner=c.owner and c.constraint_type='P' --type为P表示为主键值,还有关于外键等 ) d on a.owner=d.owner and a.table_name=d.table_name and a.column_name=d.column_name where 1=1 and a.table_name='C_ACCOUNT' and a.owner in ('AQDFCS','SDVD')