Thanks Gail.I just asked one person who has this practice of using temporary variables.They say that they keep it as a standard way to write sql procedures even there is...
In search queries when data distribution is skewed parameter sniffing can be a problem and local variables can be used to solve it.But I really don't understand how this comes...