DB Link:
- Data Base Link provides you the control on the tables from other database.
- It allows you to query against other databases using the syntax TABLENAME@DBLINK.
Syntax:
- Use the following code to create a database link:
create database link "database_link_name"
connect to username
identified by "password"
using 'connection_name';
connect to username
identified by "password"
using 'connection_name';
Example:
create database link "HRDEV"
connect to sysadm
identified by "sysadm"
using 'HR89DEV';
Usage:
create database link "HRDEV"
connect to sysadm
identified by "sysadm"
using 'HR89DEV';
Usage:
- Now we can select any record from HR89DEV database as follows.
- SELECT * FROM PS_JOB@HRDEV;
No comments:
Post a Comment