database - How to display data from multiple tables in SQL -


i'm relatively new sql. i'm trying figure out how satisfy condition: display customer_id, customer_last_name, order_id,order_item_id, product_name customer living in virginia.

so far, have this, i'm not sure how display values together. appreciated.

select customer_id, cust_first_name demo_customers cust_state= 'va'  select order_id demo_orders customer_id= '1' 

you need join

select customer_id, cust_first_name, order_id, order_item_id, product_name demo_customers inner join demo_orders on demo_orders.customer_id = demo_customers.customer_id cust_state= 'va' 

Comments

Popular posts from this blog

php - Extract Text from HTTP referer -

Receive udp packets in android gstreamer -

Reversible shuffling a int array in java -