table :First
..............................................................................
id | ros | table | column | stool | date | places|
..............................................................................
1 12 5 6 a 2017-07-17 goa |
2 12 5 6 b 2017-07-17 delhi|
..............................................................................
table :second
..........................................................................
id | ros | name | email | phone | stos|address |date |
....................................................................................................
5 12 and [email protected] 394924673464 6 fddsfds 2017-07-03 |
6 12 her [email protected] 84838593894 6 fdafdfd 2017-07-04 |
....................................................................................................
Query like I am Using:
SELECT `p`.* FROM `first` `p` LEFT JOIN `second` as `st` ON `st`.`ros`=`p`.`ros` ORDER BY `id` DESC LIMIT 10;
我的問題是爲什麼它返回4行而不是2? 它的resurning 4價值沒有在表中我應該需要使用不同或分組爲由?後加入數據重複mysql查詢
你會需要要添加另一個連接條件來停止重複,但表中的任何內容都不能滿足此要求。 –