2
我希望選擇一個用戶參與的消息的表中的所有對話這個查詢的工作爲:MySQL的ID爲等於列別名
select distinct message_conversationID from messages where message_userID = 2
不過,我當時想反過來提取物給出外鍵message_conversationID的所有會話標題(來自另一個表)。我嘗試這樣做:
select conversation_titles from conversations having conversation_id =
(select distinct message_conversationID as temp from messages where message_userID = 2)
但是,看來我無法驗證其ID與多行數據等於。我還有什麼可以在別名列中提取所有帶有ID的標題?