SQL is evaluated backwards, from right to left. So the where clause is parsed and evaluate prior to the select clause. Because of this the aliasing of u_name to user_name has not yet occurred.
More Related Contents:
- Using column alias in WHERE clause of MySQL query produces an error
- Unknown column in ‘field list’ error on MySQL Update query
- Can I reuse a calculated field in a SELECT query?
- SQL Query needed for fetch value from Two identical table but not fully identical table
- How to create a MySQL hierarchical recursive query?
- Error related to only_full_group_by when executing a query in MySql
- How to reset AUTO_INCREMENT in MySQL
- How to declare a variable in MySQL?
- MySQL Query GROUP BY day / month / year
- How to select a column name with a space in MySQL [duplicate]
- SQL Performance UNION vs OR
- How do I use on delete cascade in mysql?
- Adding a leading zero to some values in column in MySQL
- Using SQL to determine word count stats of a text field
- Update one MySQL table with values from another
- MySQL JOIN the most recent row only?
- How to transpose mysql table rows into columns
- MySQL Group By and Sum total value of other column
- MySQL incorrect key file for tmp table when making multiple joins
- Does the order of conditions in a WHERE clause affect MySQL performance?
- Difference between these two joining table approaches?
- MySQL query, MAX() + GROUP BY
- MySQL export into outfile : CSV escaping chars
- Simple Random Samples from a MySQL Sql database
- ALTER table – adding AUTOINCREMENT in MySQL
- sql like operator on integer
- MySQL Select minimum/maximum among two (or more) given values
- MySQL – SELECT * INTO OUTFILE LOCAL ?
- MySQL: Computed Column
- mySQL query to search all tables within a database for a string?