0
我有一個像與聯繫人姓名更改電話號碼
Contacts
number (Primary key)
name (name of the contact)
Messages
id (primary key)
number (reciever or sender's phone number)
type (sent or recieved)
text (message body)
date (timestamp)
聯繫人表我想,當我查詢的信息,然後將它們分組按電話號碼進行通話,我想改變消息表中的電話號碼將隨着聯繫人表中的聯繫人姓名(如果不存在)而改變(如果不存在),則將該電話號碼留爲電話號碼,因爲存在未知的號碼可以發短信。 PS我搜索了很多,找到一個解決方案,但沒有找到一個。
例如,
Contacts table contain
id name
1 a
2 b
Messages Contain
id number type text date
1 1 sent haha 123456
2 3 recieved hi 123459
現在的結果應該是
number type text date
a sent haha 123456
3 received hi 123459
樣品的輸入和輸出預計會找出你的要求 – 1000111
@ 1000111對不起,沒有;噸得到您的點 – Axeem
我問了一些樣品的輸入和輸出預計基於該樣品輸入。還分享您當前的查詢 – 1000111