I want to know if there is a way to use a user-defined variable in WHERE clause, as in this example:
SELECT id, location, @id := 10 FROM songs WHERE id = @id
This query runs with no errors but doesn't work as expected.
I want to know if there is a way to use a user-defined variable in WHERE clause, as in this example:
SELECT id, location, @id := 10 FROM songs WHERE id = @id
This query runs with no errors but doesn't work as expected.