********************************************************************
* Description: Knowledge of switching schema within Oracle database
* Date: 05:53 PM EST, 07/14/2017
********************************************************************


<1> Switching schema:
     |
     |__ o. In subsequent SQL statements, Oracle Database uses this schema name as the schema qualifier when the qualifier is omitted. 
     |      In addition, the database uses the temporary tablespace of the specified schema for sorts, joins, and storage of temporary database objects. 
     |      The session retains its original privileges and does not acquire any extra privileges by the preceding ALTER SESSION statement.
     |	
     |
     |                   SQL> connect scott
     |                   SQL> alter session set current_schema = joe;
     |                   SQL> select * from emp;
     |
     |
     |__ o. Because emp is not schema-qualified, the table name is resolved under schema joe. But if scott does not have select privilege on table joe.emp, 
            then scott cannot execute the SELECT statement.
	
	
	
<2> Reference:
     |
     |__ o. https://docs.oracle.com/cd/B28359_01/server.111/b28310/general009.htm#ADMIN02101	 
	 
	
	

Your Comments