title: create synonym for table in a database hosted in a different server
body: <p>In oracle, if the other database is within the same server, I did the following to create a synonym</p>
  
  <pre><code>CREATE SYNONYM synonymName FOR databaseName.schema.table;
  </code></pre>
  
  <p>What should I do to create a synonym for tables in a database hosted in a different server so that I could provide the server connection credentials. </p>
  
  <p>I need this for both oracle and netezza.</p>
  
  <p>Edit: While trying(for Oracle) by taking reference of the answer below, I got a syntax error when the remote link contains ip address or a '-' in the link name. eg.</p>
  
  <pre><code>CREATE PUBLIC DATABASE LINK abc-def.xyz.com CONNECT TO user IDENTIFIED BY pw USING 'databaseName';
  </code></pre>