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.
Author |
Topic |
ozSQLServer
Starting Member
32 Posts |
Posted - 2011-12-21 : 23:53:40
|
Hi,Simple question about T-SQL:"Can I define a proceudre B in procedure A?"so that procedure B can only be called by the code in procedure A.Cheers,ozSQL |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-12-22 : 04:17:05
|
nope. you cant nest procedure definitions like that.But you can grant the execution rights to only one of user (maybe a dummy one you create) and associate the other procedure to be executed on context of created user. I think that will provide you with closest alternative for above scenario------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
ozSQLServer
Starting Member
32 Posts |
Posted - 2011-12-22 : 17:14:17
|
Thank you.Cheers,ozSQL |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-12-23 : 01:33:14
|
wc------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
Sandeep2taurus
Starting Member
1 Post |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-12-27 : 02:55:34
|
quote: Originally posted by Sandeep2taurus I think we can nest procedures. Check thishttp://msdn.microsoft.com/en-us/library/ms190607.aspxcorrect me if I am wrong
nope..OP is not asking on thisYou can nest stored procedure callsbut you cant nest stored procedure definitions ie creating one procedure inside another procedure.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|