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 |
|
purnima.m
Starting Member
3 Posts |
Posted - 2006-03-04 : 03:24:43
|
| Hi ,I am new to SQL Server.1.Can anyone please tell methe scope of local variables used in SQL Scripts?2.If a local variable is being used in a Cursor'swhile loop do we need to Reintialise the local variablesto prevent old values being retained?Thank YouPunimaPunima |
|
|
chiragkhabaria
Master Smack Fu Yak Hacker
1907 Posts |
Posted - 2006-03-04 : 03:35:36
|
| It depends where you are declaring your local variable. The scope of the local variable is limited upto the batch. if you are you have declared the variable at the top of the stored procedure then it can be access through out the procedure..Sucess Comes to those who Believe in Beauty of their Dream.. |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
|
|
|