Oracle Magazine, Nov/Dec 2017
Database Application Developer and DBA BEYOND SQL 101 schema is owned by a single Oracle Database user account the terms schema and user are often used interchangeably Listing 1 illustrates the relationship between the SQL_ 201 user and its associated schema The query of the USER_ OBJECTS data dictionary view in Listing 1 returns schema object information for the currently logged in database user All of the objects returned in the result set belong to the SQL_ 201 schema Recall from the script you use to create the tables for the SQL_ 201 schema used for this articles examples that you create a database user with the CREATE USER data definition language DDL command Recall also from the same creation script that you were logged in as a user other than SQL_ 201 to create the SQL_ 201 user Listing 1 Query the USER_ OBJECTS data dictionary to return schema object information for the currently logged in database user SQL select object_ type object_ name 2 from user_ objects 3 order by object_ type object_ name OBJECT_ TYPE OBJECT_ NAME INDEX DEPARTMENT_ NAME_ LOCATION_ UK INDEX DEPARTMENT_ PK INDEX DEP_ WAGE_ INCREASE_ I INDEX EMPLOYEE_ PK INDEX EMPLOYEE_ WAGE_ INC_ WORTH_ BMI INDEX EMP_ DEPT_ FK INDEX EMP_ HIRE_ DATE_ I ORACLE MAGAZINE NOVEMBER DECEMBER 2017 89
You must have JavaScript enabled to view digital editions.