Create synonym for table : Synonym « User Previliege « Oracle PL / SQL

Home
Oracle PL / SQL
1.Aggregate Functions
2.Analytical Functions
3.Char Functions
4.Constraints
5.Conversion Functions
6.Cursor
7.Data Type
8.Date Timezone
9.Hierarchical Query
10.Index
11.Insert Delete Update
12.Large Objects
13.Numeric Math Functions
14.Object Oriented Database
15.PL SQL
16.Regular Expressions
17.Report Column Page
18.Result Set
19.Select Query
20.Sequence
21.SQL Plus
22.Stored Procedure Function
23.Subquery
24.System Packages
25.System Tables Views
26.Table
27.Table Joins
28.Trigger
29.User Previliege
30.View
31.XML
Oracle PL / SQL » User Previliege » Synonym 
Create synonym for table
  
SQL>
SQL> CREATE TABLE source_log
  2  (backup_date    DATE,
  3   backup_time    VARCHAR2(6),
  4   last_ddl_time  DATE,
  5   owner          VARCHAR2(30),
  6   name           VARCHAR2(30),
  7   type           VARCHAR2(12),
  8   line           NUMBER,
  9   text           VARCHAR2(2000))
 10  /

Table created.

SQL> CREATE INDEX source_log_idx1 ON source_log
  2    (last_ddl_time, owner, name)
  3  /

Index created.

SQL> CREATE or replace PUBLIC SYNONYM source_log FOR source_log
  2  /

Synonym created.

SQL> GRANT SELECT, INSERT ON source_log to PUBLIC
  2  /

Grant succeeded.

SQL>
SQL> drop table source_log;

Table dropped.

SQL>
SQL>

   
  
Related examples in the same category
1.Creating a Public Synonym
2.Creating a Private Synonym
3.drop synonym addresses;
4.drop public synonym;
5.create synonym for a view
6.Create synonyms for dropped tables
7.Viewing synonyms and what they reference.
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.