You may need to use a CASE expression. It can be like this: SELECT col1, col2, (case when (action = 2 and state = 0) THEN 1 ELSE 0 END) as ...
確定! 回上一頁