選擇行有了這個表SQL - 從兩個不同的表
Table "Items"
itemID
itemTitle
itemContent
這
Table "MyList"
userID
itemID
deleted
我如何從表「項目」選擇所有的行和顯示領域的「刪除」,甚至如果itemID不存在於「MyList」中,給定一個用戶ID?查詢結果的
例子:
itemID | itemTitle | deleted | userID
-------------------------------------
1 | Title1 | 1 | 2
2 | Title2 | 0 | 2
3 | Title3 | (null) | (null)
4 | Title4 | (null) | (null)
什麼是查詢,這樣我就可以得到這一結果?
感謝