What Privilege Is Needed for a User to Create Tables in Oracle?
Submitted by: AdministratorTo be able to create tables in a user's own schema, the user needs to have the CREATE TABLE privilege, or the CREATE ANY TABLE privilege, which is more powerful, and allows the user to create tables in other user's schema. The following tutorial exercise gives you a good example on CREATE TABLE privilege:
>.insqlplus /nolog
SQL> CONNECT DEV/developer
SQL> CREATE TABLE ggl (id NUMBER);
ORA-01031: insufficient privileges
SQL> disconnect
SQL> connect SYSTEM/globalguideline
SQL> GRANT CREATE TABLE TO dev;
Grant succeeded.
SQL> disconnect
SQL> CONNECT DEV/developer
SQL> CREATE TABLE ggl (id NUMBER);
ORA-01950: no privileges on tablespace 'SYSTEM'
The above error message tells that user "dev" is not allowed to use the tablespace "SYSTEM". See the next question for answers.
Submitted by: Administrator
>.insqlplus /nolog
SQL> CONNECT DEV/developer
SQL> CREATE TABLE ggl (id NUMBER);
ORA-01031: insufficient privileges
SQL> disconnect
SQL> connect SYSTEM/globalguideline
SQL> GRANT CREATE TABLE TO dev;
Grant succeeded.
SQL> disconnect
SQL> CONNECT DEV/developer
SQL> CREATE TABLE ggl (id NUMBER);
ORA-01950: no privileges on tablespace 'SYSTEM'
The above error message tells that user "dev" is not allowed to use the tablespace "SYSTEM". See the next question for answers.
Submitted by: Administrator
Read Online Oracle Database Job Interview Questions And Answers
Top Oracle Database Questions
☺ | What Happens to Indexes If You Drop a Table? |
☺ | How To Recover a Dropped Table in Oracle? |
☺ | How Run SQL*Plus Commands That Are Stored in a Local File? |
☺ | How To Use Values from Other Tables in UPDATE Statements using Oracle? |
☺ | What Is the Relation of a User Account and a Schema? |
Top DB Oracle Categories
☺ | Oracle PL-SQL Interview Questions. |
☺ | Oracle DBA Interview Questions. |
☺ | Oracle D2K Interview Questions. |
☺ | OCI Interview Questions. |
☺ | Oracle RMAN Interview Questions. |