oracle中databaselink的使用

create database link bill.CHINACACHE
  connect to USERID
  IDENTIFIED BY PASSWORD 
  using '(DESCRIPTION=(ADDRESS = (PROTOCOL = TCP)(HOST = *.*.*.*)(PORT = 1521))(CONNECT_DATA=(SID=billbj1)(SERVER = DEDICATED)))';

 

 

使用:

 

 

select  filename from [email protected] t where  t.filename like '%billing%' and  t.createtime<=to_date('"+old_long1+" 23:59:59','yyyy-mm-dd hh24:mi:ss') and t.createtime>=to_date('"+old_long2+" 00:00:00','yyyy-mm-dd hh24:mi:ss')

你可能感兴趣的:(oracle)