开发者

MySQL cmd line characters

开发者 https://www.devze.com 2023-02-28 17:19 出处:网络
I\'m trying to remove stray characters that ended up in a MySQL table. So to remove _, I just did this:

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)
0

精彩评论

暂无评论...
验证码 换一张
取 消