- 列出已與藝術家,訂購日期和發貨日期一起銷售的所有圖書
SELECT title, artist, order_date, ship_date
FROM items,orders,orderline
WHERE orders.order_id = orderline.order_id
AND items.item_id = orderline.item_id;
我想盡自己的查詢了我得到以下
Under the Sun, Donald Arley, 11/15/2013, 11/20/2013
Under the Sun, Donald Arley, 12/20/2013, 12/22/2013
Under the Sun, Donald Arley, 1/18/2014, 1/23/2014
Dark Lady, Keith Morris, 1/31/2014, 2/4/2014
Dark Lady, Keith Morris, 3/10/2014, 3/15/2014
Dark Lady, Keith Morris, 3/14/2014, 3/19/2014
Dark Lady, Keith Morris, 11/15/2013, 11/20/2013
Happy Days, Andrea Reid, 2/27/2014, 3/2/2014
Happy Days, Andrea Reid, 10/30/2013, 11/3/2013
Happy Days, Andrea Reid, 12/18/2013, 12/22/2013
The Hunt, Walter Alford, 1/31/2014, 2/4/2014
The Hunt, Walter Alford, 3/10/2014, 3/15/2014
Ë結果tc ...............
如何是你的結果比預期的結果有什麼不同? –
我不認爲他們會,會重新發布你的問題 –
[壞習慣踢:使用舊式JOIN](http://sqlblog.com/blogs/aaron_bertrand/archive/2009/10/08/壞習慣 - 踢 - 使用舊樣式joins.aspx) - 老式*逗號分隔的表*樣式列表已停用ANSI - ** 92 ** SQL標準(超過** 20年前**) –