Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はこのようなことをしようとしています:
select ('hi' in ('hi')) as hi
「in」部分の構文が悪いため、機能しません。
IN句を使用してサブクエリのブール結果を返すことは可能ですか?
を使用して条件式を使用できますCASE。
CASE
select case when 'hi' in ('hi') then 1 else 0 end
これは sqlfiddle のデモです。
あなたができることは、次のように case ステートメントを使用して条件値をビットとして返すことだと思います。
select case when 'hi' in ('hi') then 1 else 0 end as hi
CASE を試してみてください。