Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Substitutions
Gocha Mchedlishvili (gocham_at_mci2000.com) wrote:
: I want to make SP, which propts for user name and password and then creates
: the user
: I wrote the code
: CREATE USER &UserName IDENTIFIED BY &PWord
: GRANT CREATE ANY TABLE TO &UserName
: When I run this script, I'm prompted twice for username.
: How to make it to prompt it only once?
: Thanks
: Gocha
Do you mean under SP Stored Procedure or SQL*Plus? You can't use SQL*Plus peculiarities, such as '&variable' in stored procedures.
In SQL*Plus script it will be the next:
CREATE USER &&UserName IDENTIFIED BY &&PWord; GRANT CREATE ANY TABLE TO &&UserName;
Good luck!
![]() |
![]() |