Quote:
Quote:
Originally Posted by tonkuma
I think that the join in subquery is not neccesary.
Why not use simpler statement, like this...
Code:
UPDATE table1 t1
SET t1.column1 = 'something'
WHERE t1.column1 is null
AND EXISTS
= (SELECT 0
FROM table2 t2
WHERE t2.column1 = t1.column2
)
WITH CS
;
|
The sql I posted was just a sample to clarify the point.
I guess what I want to achieve is more of a QUEUE, hence its not what a relational database is best for....
|
Even if you used another database or keyed(or indexed) files,
you can design and write inefficient, and/or error prone programs.
You should make properly designed programs with understanding of the characteristics of the system you are using,
before complining the isuues/problems in your poorly designed program.
Back to your original SQL statement,
if there were some records of ttt1 satisfying the conditions, one of them must be t1.
It is not necessary to access table1 twice.