当前位置: 代码迷 >> Sql Server >> 一个生手,能帮忙改正下吗,一个简单的查询
  详细解决方案

一个生手,能帮忙改正下吗,一个简单的查询

热度:67   发布时间:2016-04-24 08:45:28.0
一个新手,能帮忙改正下吗,一个简单的查询
SELECT 
orders.orders_id,
orders.delivery_name,
orders.delivery_company,
orders.delivery_street_address,
orders.delivery_suburb,
orders.delivery_city,
orders.delivery_postcode,
orders.delivery_state,
orders.delivery_country,
orders. customers_telephone,
orders.shipping_method,
orders_products.products_name,
orders_products.products_model,
orders_products_attributes.products_options_values
FROM `orders_products`, `orders`,`orders_products_attributes` where orders.orders_id = orders_products.orders_id = orders_products_attributes.orders_id and orders.orders_status = 2

老是不成功
------解决思路----------------------

SELECT 
orders.orders_id,
orders.delivery_name,
orders.delivery_company,
orders.delivery_street_address,
orders.delivery_suburb,
orders.delivery_city,
orders.delivery_postcode,
orders.delivery_state,
orders.delivery_country,
orders. customers_telephone,
orders.shipping_method,
orders_products.products_name,
orders_products.products_model,
orders_products_attributes.products_options_values
FROM orders_products, orders,orders_products_attributes 
where orders.orders_id = orders_products.orders_id and orders_products.orders_id=orders_products_attributes.orders_id and orders.orders_status = 2
  相关解决方案