For example, you have a simple table with just one column. ie.
CREATE TABLE movies (title VARCHAR2(255 BYTE))
set up with the following data:
INSERT INTO movies (title) VALUES ('Scream');
INSERT INTO movies (title) VALUES ('Blair Witch');
INSERT INTO movies (title) VALUES ('Friday the 13th');
INSERT INTO movies (title) VALUES ('Scary Movie');
INSERT INTO movies (title) VALUES ('Hide and Seek');
INSERT INTO movies (title) VALUES ('Alien vs Predator');
Is there a single query or PL/SQL that will do the following dynamically (ie without having to manually do a "UNION select 'scream' from dual..." for every value)?
Obviously this query is wrong but you get the idea:
Select * from movies
where title in (
'Scream',
'Scary Movie',
'Exorcist',
'Dracula',
'Saw',
'Hide and Seek'
)
Desired result being a record for every value in the "WHERE TITLE IN" clause where the record is not present in the table. ie.
'Exorcist'
'Dracula'
'Saw'