Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 hi frnds this is the code for dynamic creation of

Author  Topic 

idreamavi
Starting Member

1 Post

Posted - 2013-08-17 : 03:34:55
DECLARE
n NUMBER;
BEGIN
n:=1;
WHILE(n<=10)
LOOP
EXECUTE IMMEDIATE 'CREATE USER EM||n IDENTIFIED BY KLU';
GRANT CREATE SESSION,GRANT ANY PRIVILEGE TO EM||n;
COMMIT;
n:=n+1;
END LOOP;
END;

avinash

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-08-17 : 09:10:00
was there a question in there?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -