dblink
createdatabaselinklink名称connectto对方数据库用户名identifiedby对方数据库用户密码using'对方数据库ip:端口/实例名';
createdatabaselinkauthconnecttozwww_authidentifiedbyzwww_authusing'//10.10.44.2:1521/orcl';
SELECT*
fromzwww_auth(数据库名).t_role_usert
或者
SELECT*
fromzwww_auth(数据库名).t_role_user@autht
/*select*
fromZHOUSHAN_20130620.bjxlb(用户名)@slt(dblink名)b
whereb.bjlbbh=60andb.bjxlbhnotin(selectlxbmfromt_soc_rcsjlx)*/
对于在代码上操纵垮库的,是可以的,但是封装太死不行的话可以用视图,这时只有用视图,在数据库上可以用普通方式
createorreplaceviewv_syslogas
select"ID","TYPE","USER_ID","USER_NAME"asUSERNAME,"LOG_DATE"asLOGDATE,"OPERATE","MESSAGE","IP","MAC","STATUS"fromzwww_auth.t_syslog@auth;
相关推荐
专注前端开发 2020-10-21
苏康申 2020-11-13
vitasfly 2020-11-12
oraclemch 2020-11-06
liuyang000 2020-09-25
FellowYourHeart 2020-10-05
赵继业 2020-08-17
whyname 2020-08-16
Seandba 2020-08-16
dbasunny 2020-08-16
拼命工作好好玩 2020-08-15
langyue 2020-08-15
写程序的赵童鞋 2020-08-03
Accpcjg 2020-08-02
tydldd 2020-07-30
好记忆也需烂 2020-07-28
jianghero 2020-07-28