Create Schema in oracle 10g express edition

纵然是瞬间 提交于 2019-12-03 12:18:40

You don't need to explicitly create schema, Oracle automatically creates a schema when you create a user (see CREATE USER documentation).

If you really want, you can use CREATE SCHEMA statement and issue it through Oracle Express web interface or from SQL prompt.

onkar

The CREATE SCHEMA statement can include CREATE TABLE, CREATE VIEW, and GRANT statements. To issue a CREATE SCHEMA statement, you must have the privileges necessary to issue the included statements.

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 hr; 

As zendar said, creating a user automatically creates their schema (in Oracle these are pretty much the same concept).

When you create a Workspace in apex, it will ask you if you want to use an existing schema or create a new one - so that's another easy option you could use.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!