I just want to select backslash-period “(.)”.
In the MySQL client when I run
mysql> select '\.';
+----+
| . |
+----+
That is the outcome I want, but when I create a file name reverse.sql contains the same query as following
cat reverse.sql
select '\';
When I run this query in the following way I get:
mysql -h mysqlhost -u admin -p -N mydatabase < reverse.sql
\.
Instead of “.” I get “.”.
Because backslash-period is special character bash hinders me I guess, but is there any way to solve this issue and get “.” instead of “\.”?
MySQL version 8.0.37
Thanks!