51Testing软件测试论坛

标题: 有两个表orders(包含order_id、customer_id、order_date)和customers(包含custo... [打印本页]

作者: 测试积点老人    时间: 7 天前
标题: 有两个表orders(包含order_id、customer_id、order_date)和customers(包含custo...
有两个表orders(包含order_id、customer_id、order_date)和customers(包含customer_id、customer_name),如何查询每个订单的订单号、客户姓名和订单日期?


作者: kallinr    时间: 6 天前
SELECT o.order_id, c.customer_name, o.order_date
FROM orders o
JOIN customers c ON o.customer_id = c.customer_id;
作者: oliver.tang    时间: 6 天前
select A.order_id, B.customer_name,A.order_date from orders A left join customers B on A.customer_id = B.customer_id
作者: 海海豚    时间: 6 天前
SELECT o.order_id, c.customer_name, o.order_date
FROM orders o
JOIN customers c ON o.customer_id = c.customer_id;
作者: jingzizx    时间: 6 天前
SELECT o.order_id, c.customer_name, o.order_date
FROM orders o
JOIN customers c ON o.customer_id = c.customer_id;
作者: 你好浮戈    时间: 6 天前
SELECT o.order_id, c.customer_name, o.order_date
FROM orders o
JOIN customers c ON o.customer_id = c.customer_id;
作者: litingting0214    时间: 6 天前
SELECT o.order_id, c.customer_name, o.order_date
FROM orders o
JOIN customers c ON o.customer_id = c.customer_id;




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2