let say i wanna create something like this
select t.*,
(case when (select name from table2 where idtable2 = t.idtable1)= NULL then '0'
end) as result
from table1 t
how can i do it? thank you
sorry my mistakes,yes that statement it works..but it doesn't works if there is subquery before the case statement..
select t.*,(select name from table3 where idtable3 = t.idtable3)as nametable3, (case when (select name from table2 where idtable2 = t.idtable1)= NULL then '0' end) as result from table1 t