
SQL>spool /home/oracle/cc.txt
SQL>select * from tables where time between 20150101 and 20150102
SQL>spool off
2 如果数据库版本高于9i,并且查询数据库小,时间段是最近的可以尝试闪回查询
SQL>select * from tables as of timestamp (systimestamp - interval '10' minute)
3 可以通过闪回数据库,闪回到你要的时间点,然后在备份
4 可以通过exp或expdp的query参数
假设表table1中有字段setdate(date类型)oracle语法:select
*
from
table1
where (to_char(setdate,'yyyy-mm-dd')
between
'2009-01-01'
and
'2009-12-31')
sqlserver语法:select
*
from
table1
where setdate
between
'2009-01-01'
and
'2009-12-31'
access语法:select
*
from
table1
where setdate
between
#2009-01-01#
and
#2009-12-31#
exp 用户名/密码@网络服务名 file=存储地址\JPG.DMP tables =表名 query=\"where 时间字段>='时间' and 时间字段<'时间' \"欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)