国产Oscar数据库实用SQL-随时更新
作者:互联网
#获取schame下所有表名
select TABLE_NAME from all_tables WHERE OWNER =‘schamename’;
#获取表结构
SELECT * where owner='schamename' AND TABLE_NAME = 'abctest';
#获取主键
select col.column_name from user_constraints con,user_cons_columns col where con.constraint_name=col.constraint_name and con.constraint_type='P' and col.table_name='abctest';
标签:name,constraint,Oscar,数据库,SQL,schamename,col,select,con 来源: https://www.cnblogs.com/wag1027/p/14807286.html