Home » SQL & PL/SQL » SQL & PL/SQL » authid
authid [message #223580] Fri, 09 March 2007 12:18 Go to next message
getritesh
Messages: 235
Registered: July 2006
Location: INDIA
Senior Member

I created a procedure

SQL> CONN RIT/T

CREATE OR REPLACE PROCEDURE PROC
AUTHID CURRENT_USER IS
BEGIN
Execute immediate 'Create Table ritesh(c number)';
DBMS_OUTPUT.PUT_LINE('Ritesh');
END;

But on execution it said

SQL> EXEC PROC;
BEGIN PROC; END;

*
ERROR at line 1:
ORA-00955: name is already used by an existing object
ORA-06512: at "RIT.PROC", line 4
ORA-06512: at line 1

Why please help me out
Re: authid [message #223584 is a reply to message #223580] Fri, 09 March 2007 12:45 Go to previous message
joy_division
Messages: 4641
Registered: February 2005
Location: East Coast USA
Senior Member
I don't think the message could be any clearer. You already have an object with that name.
Additionally, this is about the worst concept to use a procedure for; A creation of a table. After the first time it runs, it will always fail.
Previous Topic: ORA-06530: Reference to uninitialized collection
Next Topic: How to connect on Oracle database with C++ ?
Goto Forum:
  


Current Time: Tue Dec 06 16:11:01 CST 2016

Total time taken to generate the page: 0.12935 seconds