oracle sql日期比较和查看表空间大小
2011-08-01 15:17
627 查看
在今天之前:
select * from up_date where update < to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss')
select * from up_date where update <= to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss')
在今天只后:
select * from up_date where update > to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss')
select * from up_date where update >= to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss')
精确时间:
select * from up_date where update = to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss')
在某段时间内:
select * from up_date where update between to_date('2007-07-07 00:00:00','yyyy-mm-dd hh24:mi:ss') and to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss')
select * from up_date where update < to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss') and update > to_date('2007-07-07 00:00:00','yyyy-mm-dd hh24:mi:ss')
select * from up_date where update <= to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss') and update >= to_date('2007-07-07 00:00:00','yyyy-mm-dd hh24:mi:ss')
查看表大小:
select segment_name,bytes/1024/1024 from user_segments;
select segment_name,bytes/1024/1024 from dba_segments;
select * from up_date where update < to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss')
select * from up_date where update <= to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss')
在今天只后:
select * from up_date where update > to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss')
select * from up_date where update >= to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss')
精确时间:
select * from up_date where update = to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss')
在某段时间内:
select * from up_date where update between to_date('2007-07-07 00:00:00','yyyy-mm-dd hh24:mi:ss') and to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss')
select * from up_date where update < to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss') and update > to_date('2007-07-07 00:00:00','yyyy-mm-dd hh24:mi:ss')
select * from up_date where update <= to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss') and update >= to_date('2007-07-07 00:00:00','yyyy-mm-dd hh24:mi:ss')
查看表大小:
select segment_name,bytes/1024/1024 from user_segments;
select segment_name,bytes/1024/1024 from dba_segments;
相关文章推荐
- Oracle 查看表空间的大小及使用情况sql语句
- Oracle 查看表空间的大小及使用情况sql语句
- Oracle 查看表空间的大小及使用情况sql语句
- Oracle 查看表空间的大小及使用情况sql语句
- Oracle 查看表空间的大小及使用情况sql语句
- Oracle 查看表空间的大小及使用情况sql语句
- Oracle 查看表空间的大小和使用情况sql语句
- Oracle 查看表空间的大小及使用情况sql语句
- Oracle 查看表空间的大小及使用情况sql语句和oracle增加表空间大小两种实现方法
- Oracle 查看表空间的大小及使用情况sql语句
- Oracle 查看表空间的大小及使用情况sql语句
- Oracle查看表空间的大小及使用情况sql语句
- Oracle 查看表空间的大小及使用情况sql语句
- Oracle 查看表空间的大小及使用情况sql语句
- Oracle 查看表空间的大小及使用情况sql语句
- Oracle 查看表空间的大小及使用情况sql语句
- Oracle 查看表空间的大小及使用情况sql语句
- Oracle 查看表空间的大小及使用情况sql语句
- Oracle 查看表空间的大小及使用情况sql语句
- Oracle 查看表空间的大小及使用情况sql语句