I run this query in SQL Server 2008
declare @a varchar(1) select @a = 22 select @a
he returns it
*
why does this query do this result?
You will convert 2 characters to a field with 1 character.
He does not fit.
SQL indicates that data is missing. Otherwise, it only displays 2 , and you do not know if it was the full value or not.
2
insufficient space was found -
declare @a varchar(2) select @a = 242 select @a
it will also do it
Use the following code:
declare @a varchar (2) select @a = 22 select @a
Source: https://habr.com/ru/post/1380203/More articles:VSTO Excel: how to create custom column mapping using ListObject? - data-bindingHow to replace a file inside a JAR that is inside a RAR in a Maven EAR build - mavenRedundancy warning if a warning in haskell - if-statementEditing WPF XPS - wpfConvert a date in french format in mysql datetime format - dateHow to place popup window FB.login in the middle in FF - facebookC # Windows Forms - DataRepeater "Template-Based" Binding? - c #Clojure dothreads! function - clojuremonodevelop and nunit integration - exceptionVirtualbox Networking Scripting - c ++All Articles