0

I want to use the following statement to add a row in a table named people with one column which is varchar(100)

insert into people values ('a b')

I want to have a new line between a and b.

How to do this?

I tried something like 'a CHAR(13) b' but did not work.

Thanks.

1

2 Answers 2

5

How about

'a ' + CHAR(13) + ' b'
Sign up to request clarification or add additional context in comments.

1 Comment

I normally do Cr and Ln: 'a ' + CHAR(13) + CHAR(10) + ' b'
1

This works as well:

'a' +  CRLF + 'b'

Check this link as well

How to insert a line break in a SQL Server VARCHAR/NVARCHAR string

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.