Is there a performance hit to prefixing all SP parameters with N' even when the parameter is not a unicode string?
I'm generating calls to a database dynamically in my .net code. Without actually checking each time I generate the code, I don't know which parameters are Unicode.
If the 开发者_StackOverflow社区answer is yes (there is a performance hit), what's the simplest way to check whether a paramter is unicode?
No, there isn't. If your column is Unicode you should always pass in a Unicode string.
However you shouldn't need to prefix strings from your .NET application with N
. Are you not using parameterized statements?
精彩评论