How Char(13) results in a new line in SQL Server? -




what science behind char(13) resulting in new line in sql server? wondered how works.

too long comment, elaborate little bit on comments...

if @ ascii table, see decimal , character values each. can check / view these in sql using ascii , char functions.

select      ascii_decimal_value = ascii('!')     ,ascii_character = char(33) 

the snippet above shows decimal , character values exclamation point. knowing this, should understand why 13 , 10 used carriage return , new line, respectively, , how use it. example... if run code below in ssms output results text, can see carriage return.

select      'this on first line' + char(13)      + 'and on second' 




wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -