|
-
Yes you can, you have to use dynamic sql and function SYS_CONTEXT which will return you username 'B', than you can use it.
SELECT SYS_CONTEXT ('USERENV','CURRENT_USER') into usr FROM DUAL;
'create table '|| usr ||'.table ( ... )';
...
and so on ...
Originally posted by ocp2b
Thanks. That is what I though. Is there a way to get the procedure to create the table in the schema of the user that is executing it rather than in the schema of the owner? Example: table would be created in "B", not "A".
Best wishes!
Dmitri
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|