sql query use select name inside where clause

Solutions on MaxInterview for sql query use select name inside where clause by the best coders in the world

showing results for - "sql query use select name inside where clause"
Sofia
11 May 2019
1You can not use aliased columns in a WHERE clause. You can try using a derived
2table. Perhaps something like this (sorry, not tested):
3
4select tblProgram.POIname from tblProgram
5where 
6  -- Use this if you only want to filter by the value.
7  (select count(*) as alias_name from `fb_promo_codes_used`) < 2