I have a varchar column that contains the string lol\ncats
, however, in SQL Management Studio it shows up as lol cats
.
How can I check if the \n
is there or not?
SELECT *
FROM your_table
WHERE your_column LIKE '%' + CHAR(10) + '%'
Or...
SELECT *
FROM your_table
WHERE CHARINDEX(CHAR(10), your_column) > 0