开发者

What does char(10) do in a dynamic t-sql string?

开发者 https://www.devze.com 2023-04-10 19:09 出处:网络
I have a dynamic sql st开发者_运维百科ring in a existing procedure. What does the char(10) do?

I have a dynamic sql st开发者_运维百科ring in a existing procedure. What does the char(10) do?

Set @SelectStr = @SelectStr + ' And FC.FCode = ''' + @FCode + '''' + CHAR(10)


CHAR(10) is the character represented by ASCII code 10, which is a Line Feed (\n) so its a new line.

(Although its not the windows standard new line which is Carriage Return + Line Feed CHAR(13)+CHAR(10))

In your example its probably just used to make the string more readable when its printed out.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号