Hi

I believe there is a misconception. I feel, you meant to say, the subquery does 
not return any record which is not the same as returns NULL.

In any case, I suggest you to use the "insert select" construct, see examples 
in https://www.postgresql.org/docs/current/sql-insert.html, e.g. "NSERT INTO 
films SELECT * FROM tmp_films WHERE date_prod < '2004-05-07';"

Cheers

Thiemo

Reply via email to