Quantcast
Viewing latest article 1
Browse Latest Browse All 3

Answer by Gordon Linoff for SQL conditional insertion of data. SQLite

You would use insert . . . select:

insert into customers (id, v1, v2, v3)    select m.id, null, null, null    from missing m    where m.v1 = 'Y' and m.v2 = 'Y' and m.v3 = 'Y';

That said, you should revise your data model. The table missing is not needed; all the information is in customers.


Viewing latest article 1
Browse Latest Browse All 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>