讓我們想象兩個表:Mysql,如何擺脫重複記錄,加入?
username
id, name
1 username1
2 username1
3 username2
emails
id, user, name
1 1 [email protected]
2 2 [email protected]
3 3 [email protected]
的問題是有重複的條目。我不能簡單地放棄它們,因爲記錄與它們相連,所以它們會迷路。 (例如[email protected]電子郵件地址)。如何解決它?
所以如果theere是多條記錄,其中哪些想找回?在'username.id'的情況下 –
你想要的結果是什麼? –