What would result from the following?
CREATE TABLE my_table (
id INT
);
INSERT INTO my_table (id) VALUES (2.9), (3), (3.4), (3.9), (4);
SELECT * FROM my_table AS m WHERE my_table.id > 3;
Answer:
ERROR 1109 (42S02): Unknown table 'my_table' in where clause.
(because it uses an alias for my_table, we should have said WHERE m.id > 3

Leave a Reply