SQL Server : automatic truncate OFF
<p>I have this code:</p>

<pre><code>DECLARE @TABLE TABLE ([KEY] VARCHAR(10), VALUE VARCHAR(5)) 

INSERT INTO @TABLE SELECT 'A', '10' 

INSERT INTO @TABLE SELECT 'ABC', '200'

----- GET DATA  
---- PROBLEMATIC VARCHAR(1) -- must be VARCHAR(10) 
DECLARE @a VARCHAR(1) = 'ABC'  

SELECT * 
FROM @TABLE 
WHERE [KEY] = @a
</code></pre>

<p>This code returns data for "A" .</p>

<p>But I need get error or warning about truncation. Is there any option to set it immediately?</p>

<p>I will change <code>DECLARE @a</code>, but here is OLD system and to many procedures - the option could give me more time for this changes.  </p>

<p>Tanks for your help</p>

<p>David</p>