| RAJNISH |
Posted: Aug 30, 2008 08:42:20 AM |
Total Post: 92
Joined: Jan, 2007
|
hi All,
ANY ONE CAN TELL ME .....MY QUESTION IS...
THERE R 2 SCHEMA I.E SCHEMA A AND SCHEMA B
MY EXALE:- CREATE PROCEDURE PROC1
IS
BEGIN
INSERT INTO EMPLOYEE(1001.RAMESH);
END;
I HAVE GIVEN EXECUTE RIGHTS SCHEMA B TO EXECUTE THESE PROCEDURE..BUT EMLOYEE TABLE ALSO AVAILABLE IN SCHEMA B.
WHEN SCHEMA B EXECUTE THESE PROC THEN DATA INSERT INTO WHICH SCHEMA'S TABLE.
WEATHER IT IS INSERT INTO EMPLOYEE TABLE OF SCHEMA A OR SCHEMA B.
2ND QUESTION IS..IF IT IS INSERT THE DATA INTO EMPLOYEE TABLE OF SCHEMA A THEN I WANT INSERT THE DATA INTO EMPLOYEE TABLE OF SCHEMA B FOR THESE CASE WHAT SHOULD I DO?
--RAJNISH
|
|
|
vino |
| Posted: Sep 01, 2008 05:51:37 AM | |
|
Total Post: 357
Joined: Aug, 2008
|
Hi Rajinish,
The schema who is executing the procedure will get the value on his owned table. It won't go the another user table.
To insert values in schema A,use
INSERT INTO A.EMPLOYEE(1001.RAMESH);
To insert values in schema B,use
INSERT INTO B.EMPLOYEE(1001.RAMESH);
|
|
|
|
|
RAJNISH |
| Posted: Sep 01, 2008 06:01:25 AM | |
|
Total Post: 92
Joined: Jan, 2007
|
Hi Vino,
But i dont want give Schmena in Alise.
my proc in schema A only but i have given grant to execute rightd to schema B.
whenever schea B execute this proc then in wch table data will b insert and whcih schema as well.
i dotn give A.emloyee in proc.
in my proc scrit is like this only.
insert into emp('1','aaaa');
|
|
|
|
|
Vish |
| Posted: Sep 02, 2008 01:04:18 PM | |
|
Total Post: 127
Joined: Jan, 2007
|
Dear Rajnesh
Ans 1
If you want to execute procedure of scheam A then you need to use
following
execute schemaname.procdurename
then only your procedure will be executed.
and it will insert value in main schema ie. schema A. not in schema B.
Ans 2
If you want to insert in to table which in in schema B then you need
to write following
insert into tablename values ();
I hope i have clear your doubt. If you have any problem pl. e-mail me on vis_72@yahoo.com
Pl. tell me if i am wrong.
|
|
|
|
|
| Time Zone: EDT |
Send this thread to your friend |