Oracle schema is injured when the user wants to have multiple schemas in one sid or service name.
The following statement creates a schema named ciw
for the sample order entry user ciw
, creates the table new_product
, creates the view new_product_view
, and grants the SELECT
object privilege on new_product_view
to the sample human resources user codeitworld
.
CREATE SCHEMA AUTHORIZATION oe
CREATE TABLE new_product
(color VARCHAR2(10) PRIMARY KEY, quantity NUMBER)
CREATE VIEW new_product_view
AS SELECT color, quantity FROM new_product WHERE color = 'RED'
GRANT select ON new_product_view TO codeitworld;
That’s it for this tutorial to make schema in oracle, Happy coding 🙂 Schema