Sql – ORA-01031 Insufficient privileges while CREATING a VIEW

oracleoracle11gsqlview

When I try to create a view that including different tables I'm getting the following error:
Error at Line 1:
ORA-01031 Insufficient privileges.

Could anyone tell me what could be the problem. I tried following the another stackoverflow post mentioned here but it's pertaining to
different schemas.

ORA-01031: insufficient privileges when selecting view

Please let me know as I'm new here.

My Query is as follows:

ORiginal Question:Create a view to select employee ID, employee name, hire date, and department number.

MY SOLUTION:

CREATE VIEW SIMPVIEW AS
SELECT EMPNO, ENAME, HIREDATE,DEPTNO
FROM EMP;

Best Answer

Then probably you may not have the privileges to perform the CREATE VIEW command in your database schema... Log in into SYSDBA account and issue the command

GRANT CREATE VIEW TO <dbusername>;

Here <dbusername> should be replaced with the name of the user you want to give access to the CREATE VIEW command.

Related Topic