Data cleaning: Difference between revisions

Jump to navigation Jump to search
352 bytes added ,  15 March 2019
Line 471: Line 471:
How to display the Non-breaking space? In MySQL
How to display the Non-breaking space? In MySQL
<pre>
<pre>
SELECT '12345678 ';
SELECT CONCAT('12345678', UNHEX('C2A0'))
-- Result of above query: '12345678 ' (one whitespace at the end)


SELECT HEX('12345678 '), LENGTH('12345678 ');
SELECT HEX(CONCAT('12345678', UNHEX('C2A0')))
-- Result of above query: 12345678C2A0
-- Result of above query: 3132333435363738C2A0
 
SELECT HEX('12345678')
-- Result of above query: 3132333435363738 (You mat notice the difference of query result is C2A0)
 
SELECT LENGTH('12345678')
-- Result of above query: 8
 
SELECT LENGTH(CONCAT('12345678', UNHEX('C2A0')))
-- Result of above query: 10
</pre>
</pre>


Navigation menu