我想将LIKE
运算符用作以下列:
SELECT name, (name LIKE '%flow%') AS bool1
FROM table1
WHERE ...
得到结果:
name bool1
-------------- ----------
over flow 1
stack over flow 1
stack over 0
答案 0 :(得分:4)
select name, case when name like '%flow%' then 1 else 0 end as bool1
from table1
where...