Test= Select * fromfavoriteguidance Test - ; UserID|Createtime|Objectcreatetime|Title|Objectid-----------+-------------------------------+-------------------------------+-----------+----------- 100000004 | .- ,- - xx: -:26.452547-Geneva | .- ,- - xx: -:26.158434-Geneva |Campus Navigation| 100000013 100000004 | .- ,- - xx: -:26.606016-Geneva | .- ,- - xx: -:26.606016-Geneva |Guidance| 1 100000004 | .- ,- - xx: -:26.606016-Geneva | .- ,- - xx: -:26.606016-Geneva |Guidance| 2 100000071 | .- ,- the xx: $:08.093299-Geneva | .- ,- . A: -:44.729831-Geneva |Campus Navigation 1| 1 3 | .- ,- the A: -:13.823857-Geneva | .- ,- . A: -:44.729831-Geneva |Campus Navigation 1| 1 1 | .- ,-Ten One: -:52.847896-Geneva | .- ,- . A: -:44.729831-Geneva |Campus Navigation 1| 1(6rows) Test= SelectFavorite.objectid "id" fromFavoriteguidance Favorite Left outer JoinGuidance data on(Favorite.objectid=Data.id andTest (>Favorite.userid= 100000004); ID----------- 100000013 1 2 1 1 1(6Rows
Test= SelectFavorite.objectid "id" fromFavoriteguidance Favorite Left outer JoinGuidance data on(Favorite.objectid=Data.id)whereFavorite.userid= 100000004; ID----------- 100000013 1 2(3Rows
PostgreSQL INNER JOIN