Synonym Synonyms
Synonyms (Oracle database only)
Such a query statement always exists:
Select sysdate from dual; (Query System Information)
I have always stressed that dual is a virtual table. Although it is a virtual table, it is
Where is it defined?
If you are using system to connect to the database, check whether the table belongs to the System
Switch user
Conn system/magager (password set after database installation)
Select * From tab where tname = 'dual ';
Query all tables without dual;
Go to the super administrator sys user to query:
Conn sys/change_on_install as sysdba;
Select * From tab where tname = 'dual ';
This table exists under sys
However, I can access table names directly under Scott users. Normally, if you want to access different users
The table must use "User Name. Table name ";
Use the following SQL statement under sys
Select * from EMP;
Error: Table or view does not exist
Select * from Scott. EMP;
It can be seen that dual actually plays a role through synonyms, which allow other users
You can easily access the "user name. Table Name" to access tables under other users.
Create synonym name for username. Table Name;
Example: Create an EMP synonym for the EMP table under the Scott user.
Query by Synonym
Create synonym EMP for Scott. EMP;
Select * from EMP;
Query can be completed
Example: delete a synonym for EMP
Drop synonym EMP;
Source: http://student.csdn.net/space.php? Uid = 362532 & Do = Blog & id = 32174