-- Create database link
create database link DB_LINK_84
connect to JHHMS identified by "password"
using '192.168.17.84';
select t.TABLE_NAME TABLE_NAME_84,t.COLUMN_NAME COLUMN_NAME_84,table1.TABLE_NAME,table1.COLUMN_NAME from user_tab_columns@db_link_84 t
left join (select TABLE_NAME,COLUMN_NAME from user_tab_columns ) table1
on t.TABLE_NAME=table1.TABLE_NAME and t.COLUMN_NAME=table1.COLUMN_NAME
where table1.column_name is null
-- Drop existing database link drop public database link dblink_name; -- Create database link create public database link dblink_name connect to SYSTEM identified by "password" using '192.168.1.73:1521/oracle';