I am debugging a stored procedure in MySQL and I don't know where my error is. I have following code:
SELECT refreshToken.token FROM refreshToken WHERE refreshToken.accountId = 2;
This code returns an empty set. But this code:
SELECT refreshToken.token INTO @a FROM refreshToken WHERE refreshToken.accountId = 2;
SELECT @a;
returns the first value in the table.