在DB2中使用比较运算符ALL()
我需要一些值,具体取决于两个值,这很简单,但我不知道如何在DB2中使用它 例如:在DB2中使用比较运算符ALL(),db2,Db2,我需要一些值,具体取决于两个值,这很简单,但我不知道如何在DB2中使用它 例如: col1 col2 123 abc 123 def 124 ghi 123 ghj select col1 from table where col2 =ALL('abc','def') 你用错了 我想你想进来 select col1 from table where col2 IN ('abc','def') 你认为所有的abc和def都会返回什么?
col1 col2
123 abc
123 def
124 ghi
123 ghj
select col1 from table where col2 =ALL('abc','def')
你用错了 我想你想进来
select col1 from table where col2 IN ('abc','def')
你认为所有的abc和def都会返回什么?或者你可以解释一下这个查询的结果是什么,为什么?