colap Posted August 23, 2015 Share Posted August 23, 2015 user table friend table +----+--------+ +---------+-----------+ | id | name | | user_id | friend_id | +----+--------+ +---------+-----------+ | 1 | user1 | | 2 | 3 | | 3 | user3 | | 2 | 4 | | 4 | user 4 | +---------+-----------+ | 5 | user 5 | | +----+--------+ | | | | | | | +-------------------LEFT JOIN---------------------+ select * from user inner join friend, Inner join has 10 cartesian product(rows). select * from user left join friend, does this also produce 10 cartesian product(rows)? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Barand Posted August 23, 2015 Share Posted August 23, 2015 If you got around to trying it you would find you get a syntax error when using LEFT JOIN without a join condition (ON or USING) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.