- -- Create premium_customers table like customers then execute this query
- INSERT INTO premium_customers
- SELECT * FROM customers
- WHERE cust_id IN (SELECT DISTINCT cust_id FROM orders WHERE order_value > 5000);
SQL Insert Statement With Subquery – MYsql Code |
---|
|
SQL Insert Statement With Subquery
|
Published: | September 28, 2020 |
Author: | admin |
Category: | SQL Advanced, SQL Source Code |
Views: | 28 |
This article was posted in SQL Advanced, SQL Source Code and tagged Exercise SQL Insert Statement With Subquery, How to write SQL Insert Statement With Subquery, SQL Insert Statement With Subquery - SQL Example. Bookmark the permalink. Follow comments with the RSS feed for this post.Post a Comment or leave a trackback: Trackback URL.
|
|