December 8, 2014 at 6:31 am
If a table column has a datatype say VARCHAR(5)
but the sproc references the column as
Declare @column Varchar(10).
Is that considered as an Implicit conversion, or is only when SQL has to change the data type in the background.
Ie VArchar in the base table.
To Nvarchar in the sproc.
December 8, 2014 at 7:29 am
There is no conversion for character size. From Varchar to NVarchar is a implicit conversion. See BOL "CAST and CONVERT (Transact-SQL) " for table
December 8, 2014 at 8:20 am
And remember, the conversions, implicit or explicit, are only issues if they occur in HAVING, WHERE, & ON criteria. Data conversion within the SELECT doesn't matter.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
December 8, 2014 at 9:45 am
Thanks.;-);-);-);-)
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply