I have a file of comma-separated user ids. And I’d like to SELECT
for these users.
That’s to say I imagine it ought to be looking like this:
mysql> SELECT u.token, u.user_id FROM users u WHERE u.user_id IN (SELECT * LOAD_FILE('/home/alex/lzmigration/users'));
Somehow this LOAD_FILE
thingy does not work. I’m not sure I understand why.
I’m getting this error:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LOAD_FILE('/home/alex/lzmigration/users'))' at line 1
Here is the version info.
mysql> SELECT VERSION();
+-----------+
| VERSION() |
+-----------+
| 8.0.35-27 |
+-----------+