I went through some PL/SQL codes and found a piece of query where I not actually get how it works. Hoping to get some technical advise from here.
The piece of query was shown as below:
SELECT a.ROWID
FROM TableA a
WHERE a.object_name IN ('HEADERS','LINES','DELIVERIES')
AND a.change_type IN ('A','C')
AND a.ROWID NOT IN (SELECT MAX (b.ROWID)
FROM TableA b
WHERE b.object_name = a.object_name
AND b.change_type = a.change_type
AND b.pk1 = a.pk1
AND b.object_identifier = a.object_identifier
);
From what I know, the inner query should run first (correct me if I am wrong) and then the inner query result will used for the outer query.
For the above query, how the inner query run as it needs data from the outer query (data from alias TableA a).
Hope to have some guidance on this as I am very fresh in PL/SQL development.
Thanks!