I keep getting MySQL error #1054, when trying to perform this update query: It’s probably some syntax error, but I’ve tried using an inner join instead and other alterations, but I keep getting the same message: Answer Try using different quotes for “y” as the identifier quote character is the backtick (`). Otherwise MySQL “thinks” that you point to a
Tag: mysql-error-1054
Using column alias in WHERE clause of MySQL query produces an error
The query I’m running is as follows, however I’m getting this error: #1054 – Unknown column ‘guaranteed_postcode’ in ‘IN/ALL/ANY subquery’ My question is: why am I unable to use a fake column in the where clause of the same DB query? Answer You can only use column aliases in GROUP BY, ORDER BY, or HAVING clauses. Standard SQL doesn’t allow