SQL SERVER – Difference between Line Feed (\n) and Carriage Return (\r) – T-SQL New Line Char- New Line in T-SQL

Today one of friend named Aneesh come and asks me about the difference between Line Feed and carriage Return. To be frank I don’t know the technical term of for a new line in OS.I searched in the Google and got some good results. I will explain what I learnt from internet.

Line feed: ‘\n’

Carriage Return: ‘\r’

SQL SERVER 2005

In sql server 2005 both Line feed and Carriage will work separately.

SQL SERVER 2005

SQL SERVER 2008

In sql server 2008 combination of both Line feed and Carriage Return will only work.

SQL SERVER 2008

Thanks Aneesh for this wonderful simple and wonderful question.

print

Leave a Reply

Your email address will not be published. Required fields are marked *


9 − = five