I am writing following query in mysql, but it returning 0 rows
select * from (select col1 as mycol from tbl) temp where temp.mycol = 5
but the following query returning 4 rows
select col1 as mycol from tbl where col1 = 5
what is wrong with 1st query?