MySQL cmd line characters
I'm trying to remove stray characters that ended up in a MySQL table. So to remove _
, I just did this:
UPDATE table SET f开发者_如何转开发ield = REPLACE(field, '_', '');
Now I'm trying to do the same thing with ¬
, but I can't place this character in the command line (bash). Any tips for encoding / escaping this character?
It depends on your locale, but if you're using UTF-8 then this works for me:
echo -e '\0302\0254'
Update:
Does this do it for you?
mysql> select x'c2ac';
+---------+
| x'c2ac' |
+---------+
| ¬ |
+---------+
1 row in set (0.00 sec)
精彩评论