我写了一个像下面这样的小查询.它给了我输出.
select user_id
from table tf
where tf.function_id in ('1001051','1001060','1001061')
Run Code Online (Sandbox Code Playgroud)
但是,当我运行如下所示的查询时,它显示0输出.但是我已经手动验证了我们有user_id,其中所有3个function_id都存在.
select user_id
from table tf
where tf.function_id='1001051'
and
tf.function_id='1001060'
and
tf.function_id='1001061'
Run Code Online (Sandbox Code Playgroud)
使用AND子句看起来很简单.但是我没有得到理想的输出.难道我做错了什么?
提前致谢
sql ×1