Get the latest tech news

INNER JOIN ON vs WHERE clause


For simplicity, assume all relevant fields are NOT NULL. You can do: SELECT table1.this, table2.that, table2.somethingelse FROM table1, table2 WHERE table1.foreignkey = table2.primary...

11Others have pointed out that INNER JOIN helps human readability, and that's a top priority, I agree. Putting joining-elements into the WHERE clause conflates the which and the where-from, that's why the JOIN syntax is preferred. The first noticeable aspect of SQL that is different than other programming languages is the order in which the code is processed.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Clause

Clause

Photo of inner join

inner join

Related news:

News photo

Marvel Rivals terms of service has "non-disparagement" clause to prevent players giving "negative reviews"

News photo

Researchers jailbreak AI chatbots with ASCII art -- ArtPrompt bypasses safety measures to unlock malicious queries | ArtPrompt bypassed safety measures in ChatGPT, Gemini, Clause, and Llama2.

News photo

Tesla again threatens to sue Cybertruck buyers who try to resell the cars | Clause deleted from public version of terms is in the contract sent to buyers.