I have a procedure like this (simplified):
CREATE PROCEDURE test @userName VARCHAR(64) SELECT * FROM member M INNER JOIN order O ON M.MemberId=O.MemberId WHERE M.Username = @userName
There is a non-clustered index on Username column of the Member table.
Plan cache shows an Implicit Conversion as such:
Seek Keys: Prefix: [MyDatabase].[dbo].[Member].Username = Scalar Operator(CONVERT_IMPLICIT(varchar(64),[@Username],0))
I was just wondering what might be causing this implicit conversion as both the parameter and the field data type "UserName" is varchar(64)?
SP is called from framework like this:
EXEC test @Username=N'webSite.com'