Quantcast
Channel: Recent Edits
Viewing all articles
Browse latest Browse all 12198

Default length of varchar and char

$
0
0
Why following expression returning 1 even we already assign value to variable @myVariable ?DECLARE @myVariable AS varchar = 'abc';DECLARE @myNextVariable AS char = 'abc';--The following returns 1SELECT DATALENGTH(@myVariable), DATALENGTH(@myNextVariable);GO

Viewing all articles
Browse latest Browse all 12198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>