SQL 2016 – Retain CR/LF when copying from results grid

I ran into a little gotcha today in SSMS for SQL 2016: It strips CR/LF characters by default when you copy from the results grid. To disable this, go to Tools –> Options, expand Query Results –> SQL Server, select Results to Grid, and check “Retain CR/LF on copy or save”.

Retain CRLF

Leave a Reply