Problem in creating view in toad [message #399843] |
Fri, 24 April 2009 04:44 |
srikanth331
Messages: 9 Registered: April 2009 Location: USA
|
Junior Member |
|
|
Hi all,
I'm unable to create view in my system using toad. can anyone sugest me what is wrong with the below code. should i use any grant command before running it. if it is then how should i write it. the error it is showing is ORA-01031: insufficient privileges.. THanks in advance
create or replace view empvu30
as select ename,sal,empno
from emp
where deptno=30;
Thanks,
Sajja.
|
|
|
|
Re: Problem in creating view in toad [message #399878 is a reply to message #399853] |
Fri, 24 April 2009 06:17 |
srikanth331
Messages: 9 Registered: April 2009 Location: USA
|
Junior Member |
|
|
I executed the following stmts in toad.. if any wrong in it pls suggest me...
GRANT ALL PRIVILEGES ON emp
TO PUBLIC;
create or replace view empvu30
as select ename,sal,empno
from emp
where deptno=30;
but i'm getting the same error...
thanks,
sajja.
|
|
|
|
|
Re: Problem in creating view in toad [message #399988 is a reply to message #399985] |
Fri, 24 April 2009 16:33 |
|
Littlefoot
Messages: 21811 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
OK, so what does yourGRANT ALL PRIVILEGES ON emp TO PUBLIC; have to do with you being unable to create a view?
Please, search the documentation for CREATE VIEW. Read the "Prerequisites" section. What does it say? What did you do, and what did you NOT do from the prerequisites list?
|
|
|