【发布时间】:2018-12-26 13:52:31
【问题描述】:
我是 DB2 新手,现在面临一个问题。
我有一个硬编码的identityNo 列表和一个表,其中有一个名为identityNo 的列。我想找到identityNo,这样它们将在硬编码列表中,但不在表格的任何行中。
示例:
列表:1、2、3、4
select count(*) from myTable where identityNo = 1 => 3
select count(*) from myTable where identityNo = 2 => 0
select count(*) from myTable where identityNo = 3 => 1
select count(*) from myTable where identityNo = 4 => 0
预期结果: 2 和 4(任何可接受的格式)
【问题讨论】: