I have a C/C++ program with embedded Oracle SQL calls in proc (11.2+ version). I have a list of values (int) as an array. I would like to check through a SQL query (as proc code) which values are not in a DB table. For example, say, I have values: 10, 20, 30, 40, 50
stored in an array and my DB table t1 has column col1 that has 10, 20, 40
. So,
Select col1 from t1
will provide me:
10
20
40
So, I am looking for the excluded values, i.e. 30, 50. Can I do this through an embedded Pro*C SQL query? My list is quite large and the DB table has many values.