Tuesday, August 23, 2011

How to add a newline or line break of type nvarchar in sql server?

I want to add a newline in a content of sql column.

You can use CHAR(13) to insert a carriage return into the string. Following query shows how to insert carriage return to a column:

INSERT INTO Employee(EmployeeId, EmployeeName, Address)
VALUES(1,'Scott Allen','36 Wall Street,'+CHAR(13)+'Onterio, CA')

No comments:

Post a Comment