I have a table T with id and labels
ID LABEL
1 label_1
2 label_2
3 label_3
I have a list of labels:
('label_1', 'label_4', 'label_6' )
I would like to select those that do not exist in table T. In my case I would get 'label_4' and 'label_6'. How can I do that in SQL?
EDIT 1
Those labels are external values. I would like to print values that do not exist in my table in a log file, probably using a spool
EDIT 2
I am currently trying to put all my values in a table using pl/SQL since it is basically a huge list of values. I have this:
DECLARE
type array_t is varray(603) of varchar2(50 BYTE);
labels array_t := array_t(
'210',
'label_1',
'label_6',
'label_4'
);
BEGIN
For i in labels LOOP
Insert Into TEMP_LABEL (LABEL)
Values (i);
END LOOP;
commit;
END;
but I get the following error: pls-00456 item is not a cursor
I am stuck here.