Description\n-----------\n\nA query to retrieve the list of phone numbers for clients who ordered in the last two weeks might be written in a couple of ways. Here are two:\n\n``sql\nSELECT \nFROM\n  clients,\n  orders,\n  phoneNumbers\nWHERE\n  clients.id = orders.clientId\n  AND clients.id = phoneNumbers.clientId\n  AND orderPlaced >= NOW() - INTERVAL 2 WEEK;\n`\n\n`sql\nSELECT \nFROM\n  clients\n  INNER JOIN orders ON clients.id = orders.clientId\n  INNER JOIN phoneNumbers ON clients.id = phoneNumbers.clientId\nWHERE\n  orderPlaced >= NOW() - INTERVAL 2 WEEK;\n`\n\nDoes it make a difference? Not much as written. But you should use the second form, for these reasons:\n\n Readability. Once the WHERE clause contains more than two conditions, it becomes tedious to pick out the difference between business logic (only dates in the last two weeks) and relational logic (which fields relate clients to orders). Using the JOIN syntax with an ON clause makes the WHERE list shorter, and makes it very easy to see how tables relate to each other.\n Flexibility. Let's say we need to see all clients even if they don't have a phone number in the system. With the second version, it's easy; just change INNER JOIN phoneNumbers to LEFT JOIN phoneNumbers. Try that with the first version, and recent MySQL versions will issue a syntax error because of the change in precedence between the comma operator and the JOIN keyword. The solution is to rearrange the FROM` clause or add parentheses to override the precedence, and that quickly becomes frustrating.\n* Portability. If your queries use standard SQL syntax, you will have an easier time switching to a different database should the need ever arise.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/data-manipulation/selecting-data/joins/comma-vs-join