For example,
declare @cust_name nvarchar(255)
select @cust_name = cust_name
from tb_customer
where cust_code = 'A001'
print @cust_name
When to use it:
- Your stored procedure contains many IF statement and you want to know which path has been executed with different parameter value.
- You want to find out which stored procedure has been called when the main stored procedure has been executed.
- You want to find out what is the runtime value of the variables.
- You want to find out where is the process has exited.
No comments:
Post a Comment