How to find line break and carriage return (\r\n) in MySQL
You are working as MySQL Developer and you need to write a query that should return all the values from column which has carriage return or line break or both of them.
Let's create sample test table with some sample data and then write the query to get the records with line break and carriage return (\r\n).
create table test(id int, name varchar(100));
-- insert some sample data
insert into test
values(1,'Aamir\n'),
(2,'shahzad'),
(3,'Robert\r\n'),
(4, 'This is \n test');
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.