Posts Insert with EXISTS condition
Post
Cancel

Insert with EXISTS condition

1
2
3
4
5
6
7
8
// The following is an example of an insert statement that utilizes the EXISTS condition:


INSERT INTO suppliers
 (supplier_id, supplier_name)
 SELECT account_no, name
 FROM suppliers
 WHERE exists (select * from orders Where suppliers.supplier_id = orders.supplier_id);
This post is licensed under CC BY 4.0 by the author.