What is database link?
A database link is a schema object in one database that
enables you to access objects on another database. The other database
need not be an Oracle Database system.
How to create a database link in Oracle?
To create database link you must specify the database link name, the remote user to
connect to, the password for the remote user and the TNS service name for the
database link connection. Below are the command to create database link in oracle.
create public
database link mylink connect to remote_username identified by mypassword
using 'tns_service_name';
How to access object in database link
To access object in database link you can use @link_name as query below :
for more information about oracle database link, you can find in oracle docs page.
SELECT * FROM employees@local;
for more information about oracle database link, you can find in oracle docs page.