查看当前用户拥有的表
select table_name from user_tables;
查看所有用户的表
select table_name from all_tables;
查看当前用户下所有表注释
select * from user_tab_comments;
查看当前用户下某表所有字段注释
select * from user_col_comments where TABLE_NAME='某表名称';
日期:
片段1:
to_char(t.opentime,'yyyymmdd') between '20190926' and '20191002'
片段2:
t1.ADDTIME BETWEEN TO_DATE('2019-10-16 00:00:00', 'yyyy-mm-dd hh24:mi:ss')
片段3:
AND TO_DATE('2019-10-16 23:59:59', 'yyyy-mm-dd hh24:mi:ss')
片段4:
TO_CHAR(addtime, 'YYYY-MM-DD') BETWEEN '2019-09-01' AND '2019-09-30'
清除与新建:
drop table cgs_wx_user__info_temp1 purge;
create table cgs_wx_user__info_temp1 nologging as (select。。。。。。。。)
改变表增加字段及更新
alter table cgs_wx_use_info_temp add(zhywgls number);
update cgs_wx_use_info_temp a set zhywgls = (select zhywgls from cgs_wx_user__info_temp1 b where b.CITYNAME = 'blank') where a.DcitynameD = 'blank' ;
commit;