**1、查询实例名:**
select * from v$instance;
**2、查询当前用户表指定表字段属性:**
select * from user_tab_columns where Table_Name=‘TNAME’;
**3、查询指定表字段键:**
select * from user_cons_columns where Table_Name=‘TNAME’;
**4、给表添加主键**
–给表【TNAME】添加主键,主键名称为【TNAME_PK 】主键字段【ID】
alter table TNAME add constraint TNAME_PK primary key ( ID );
**5、给表去掉主键**
ALTER TABLE GLA_BAL DROP CONSTRAINT TNAME_PK