SELECT
ID
, NAME
, EMAIL
, (SELECT Address FROM TABLE1 where T1ID=ID) as NewAddress
FROM TABLE2
WHERE NewAddress LIKE '%string%';
Here in this query i want to check condition on NewAddress Column, I don't want to pass where condition inside subquery(Having some reason)...
I mean to say i want to check condition on alias name of subquery here NewAddress
Here i am getting error that Unknown column 'NewAddress' in 'where clause'