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
Post a Comment