Example 1:select * from Contact_card as C
INNER JOIN Contact_card_extend as B on c.uuid = B.uuid and c.uuid= ' ax61t09bpcmmhsxisvbav1mdb71jzwt3 ' and c.status= ' active '
INNER JOIN Contact_card_vcardinfo as info on c.uuid=info.card_id;
Example 2:select * from Contact_card as C
INNER JOIN Contact_card_extend as B on c.uuid = B.uuid
INNER JOIN Contact_card_vcardinfo as info on c.uuid=info.card_id
WHERE c.uuid= ' ax61t09bpcmmhsxisvbav1mdb71jzwt3 ' and c.status= ' active '
Reply to discussion (solution)
Like both
However, the latter is generally written because c.uuid= ' ax61t09bpcmmhsxisvbav1mdb71jzwt3 ' and c.status= ' active ' are not connected to the connection
Like both
However, the latter is generally written because c.uuid= ' ax61t09bpcmmhsxisvbav1mdb71jzwt3 ' and c.status= ' active ' are not connected to the connection
That's it, son.
In terms of big data, it is not known whether the former is faster, in theory, the former is the first query through the results of the association, and the first query has been conditional filtering, it should be more than the second all the query after the association after the conditional filtering faster. I think it should have been so without a try so just ask.
That's just your imagination.
There is a process in the database that is specifically used to parse the join command, and it is parsed for the connection-independent expression to be placed in the WHERE clause
If you only want the primary table to qualify for a record to participate in the query, you should use a subquery
SELECT * FROM
(SELECT * from Contact_card where uuid= ' ax61t09bpcmmhsxisvbav1mdb71jzwt3 ' and status= ' active ') As C
INNER JOIN Contact_card_extend as B on c.uuid = B.uuid
INNER JOIN Contact_card_vcardinfo as info on c.uuid=info.card_id
Educated, thank you, big God son! Have corrected the mistake!