-2

when I run select statement from mysql database, characters like \n \t will be escaped. Is there a way to see these original characters in mysql?

What I want to see is something like "java.lang.Exception: Container released on a lost node\r\n\tat"

6
  • Don't you really mean the opposite? You're apparently getting the original character (a literal tabulator or a carriage return) and you want to replace if with a escape sequence. Commented Oct 22, 2018 at 11:22
  • @ÁlvaroGonzález I do need to see the original one Commented Oct 22, 2018 at 11:30
  • I cannot reproduce it. Are you able to create a fiddle that exhibits the issue? Commented Oct 22, 2018 at 11:36
  • Want to do this in a qurey or some programming language? Commented Oct 22, 2018 at 11:40
  • @SalmanA the issue is that when I run a sql query with select and where statement, I always find there is a mismatch. Sometimes it is due to "\r\n" vs "\n" and sometimes of encoding. However, for these differences, I could not tell from the output by eyes. Commented Oct 23, 2018 at 2:20

1 Answer 1

0

Try this:

SELECT * FROM table 
WHERE column_name REGEXP "\n" 
OR column_name REGEXP "\t";
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.