How do I store text in database with line breaks or paragraph

database, sql-server, t-sql

Solution

If you are showing HTML you need to store `</br>` instead of CHAR(13).

Displaying this text in HTML will yield the correct display. In addition you can wrap a paragraph in `<p>...</p>`.

For bullet lists look at http://www2.gol.com/users/billp/articlehtml/bullet.html.

This is under the assumption that you take the text out and display in HTML.

Problem

In my application I have Terms for Apps. Before I used to put this in front-end with HTML . But now I need to put this text in database in a column called AppTerms inside table called App. I referred to this link in stackoverflow and followed like this : ``` UPDATE [AppsDatabase].[dbo].[App] SET AppTerms = 'This App has no minimum term.' + CHAR(13) + 'This App is built and is supported through the standard way of using the company online support.' + CHAR(13) + 'Incorrectly formatted data will not be formatted but may be charged for.' WHERE AppID = 8 GO ``` But I am not getting line breaks here. And also can someone tell me how can i put bullet points in each line?

Original source

Related problems