Oracle synonyms in

First, the database objects:

   Schema objects:

The database is a collection of objects of the logical structure, the basic object is a database table;

Other objects include: create add, drop delete, change alter

  Synonyms, sequences, view, index

1, synonyms:

①, an alias for an existing object:

  Simplifying the SQL statement, hidden object name and owner to provide public access to the object;

②, type:

Private Synonym:

  It can only be accessed in its mode, and can not (currently using the user) with the same name as the current mode of the object;

Public synonym:

  The database can be accessed by all users. Only an administrator user created.

③, private: synonym (System Log creation)

Copy the code
- - Create a user the CREATE   the USER test IDENTIFIED BY 123456; - create a user named test user password is 123456 GRANT the CONNECT, the CREATE SYNONYM the TO test; - - grant permissions (connect to the database, create synonyms - from Alias) GRANT the SELECT ON sCOTT.EMP the TO the Test; - inquiries GRANT dELETE ON sCOTT.EMP the TO the Test; - delete GRANT UPDATE ON sCOTT.EMP the TO the Test; - increasing the SELECT * from scott.emp; the Create synonym Staff for scott.emp; - aliases - increased security

the SELECT * from Staff; - - private synonymous, only who who create access
Copy the code

④, public: public

Sys or system user needs to create

- a sys or system log on, create a public synonym - who can check
 the Create public synonym the emps for scott.emp; the SELECT * from the emps;

 

Modify and delete principle is: Who created who modify, delete

Guess you like

Origin www.cnblogs.com/xiaozhang666/p/11267636.html