W~C停用

导航

Oracle常用语句

获得删除该用户所建表的语句

select 'drop table '||table_name||';' from cat where table_type='TABLE'

 查询登录用户名下的表大小

select segment_name, bytes/1024/1024/1024  from user_segments where segment_type = 'TABLE' order by bytes desc;

 清空整个回收站

purge recyclebin;

 分页查询

SELECT 
id,
    to_char(datadate,'yyyy-MM-dd'),
    to_char(db_field270,'YYYY-MM-DD HH24:MI:SS'),
    to_char(createdon,'YYYY-MM-DD HH24:MI:SS'),
    to_char(modifiedon,'YYYY-MM-DD HH24:MI:SS')
    (需要查询的属性)
FROM (SELECT tt.*, ROWNUM AS rowno FROM ( SELECT t.* FROM (表名) t ORDER BY DATADATE) tt WHERE ROWNUM < 1000000) table_alias WHERE table_alias.rowno >= 0;

 

 

posted on 2021-11-03 09:17  W~C停用  阅读(42)  评论(0编辑  收藏  举报