SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 hi frnds this is the code for dynamic creation of
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

idreamavi
Starting Member

India
1 Posts

Posted - 08/17/2013 :  03:34:55  Show Profile  Reply with Quote
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

India
52309 Posts

Posted - 08/17/2013 :  09:10:00  Show Profile  Reply with Quote
was there a question in there?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000