Why does SQL LEN function return '1' for a string with several characters?

后端 未结 3 1977
时光取名叫无心
时光取名叫无心 2021-01-22 00:36

Simple question - why when I print the value of the @len variable in the query below would I be getting the value 1, instead of 12 (the number of characters in the

3条回答
  •  滥情空心
    2021-01-22 01:31

    You need to give the variable @string an actual length. Print the variable @string and it will probably return 'C'.

提交回复
热议问题